Help with style sheet for my CF file

Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default Help with style sheet for my CF file

    I need to add image on my CF application, it was written by someone else using
    style sheet as follow:

    This is the style sheet that control the background color/image:
    #header {
    background: url(images/header_bg.gif) center top repeat-x;
    height: 80px !important;
    height: 90px;
    padding: 5px 20px;
    }

    Then in the CF file, the code that is affected by this style sheet is written
    this way:
    <div id="header">
    <img src="images/Logo1.gif"/>
    </div>

    In the browser, Logo1 show up on the left side of the screen with a grey
    background.

    What I need is adding 1 more logo and the second Logo should show up at the
    same level but to the right side of the screen on the opposite side of Logo1

    This is what I did but did not work:
    <div id="header">
    <img src="images/Logo1.gif"/>
    <img src="images/Logo2.gif"/>
    </div>
    This 2 Logos show up next to each other.

    Then I tried to create a spacer.gif and put the spacer in the middle like this:
    <div id="header">
    <img src="images/Logo1.gif"/>
    <img src="images/spacer.gif"/>
    <img src="images/Logo2.gif"/>
    </div>

    This also doesn't work because when the browser size changed, the 2 Logos
    distance changes as well, sometimes they're on top of each other.

    So I put them in a table like this:

    <div id="header" align="center">

    <table width="100%">
    <tr>
    <td><img src="images/Logo1.gif"/></td>
    <td><img src="images/Logo2.gif"/></td>
    </tr>

    </table>
    </div>

    This look much better but, somehow the table width is not all the way to the
    right and left of the screen even I already put table width=100%, It creates
    quite a big space on the left before logo1 and on the right after Logo2.
    I figure there must be a better way, can anyone help me please?




    alecken Guest

  2. Similar Questions and Discussions

    1. Style Sheet refresh?
      My client wanted more styles to choose from on his news pages. I have created new selections for him as Element styles and have uploaded to site. ...
    2. Style sheet problem
      Hi everyone, I've had to export a whole heap of text from a Quark document so that it ends up in Microsoft Word. The document came across into...
    3. [Indesign 2.0.2] Style Sheet
      Hi to all, I have a paragraph wich is assigned a Style Sheet, but at the end of the Sheet's name there is a "+" (if it is as xpress it means that...
    4. Iframe style sheet under DW4
      Hi everyone, got an iframe on my page that looks like this: <iframe src="a-texteoscar.htm" name="exemple" width="200" height="195"...
    5. build Style Sheet
      Hi, I have a page with a frame on the left side, and I want to give the whole left side a different color, just like you see here on both sides...
  3. #2

    Default Re: Help with style sheet for my CF file

    You can do this 2 ways. The table way is probably the easiest for you:

    <table width="100%">
    <tr>
    <td><img src="images/Logo1.gif"/></td>
    <td width="*">&nbsp;</td>
    <td><img src="images/Logo2.gif"/></td>
    </tr>
    </table>

    The middle td eats up all remaining space, which is what you were missing.

    You can also do this with <span> and floating one <span> to the left, and
    another to the right. More complicated, though. If the table method works, go
    with that, otherwise post back.

    Kronin555 Guest

  4. #3

    Default Re: Help with style sheet for my CF file

    Hi Thanks for responding. Itried the table way, it seems the
    <td width="*">&nbsp;</td> doesn't do much, spaces before and after logo1 and
    Logo1 are still there and it is quite big, around 1 inch on each site of my
    screen.

    Do you mind sending me example on using <span> ?

    alecken Guest

  5. #4

    Default Re: Help with style sheet for my CF file

    <html>
    <head>
    <body>
    <span style="float: left;">Left Text</span>
    <span style="float: right;">Right Text</span>
    <div style="clear: both;">
    After Spans</div>
    </body>
    </html>
    Kronin555 Guest

  6. #5

    Default Re: Help with style sheet for my CF file

    To get rid of the space around the screen add this to your stylesheet:-

    body {
    margin:0;
    }
    Stressed_Simon Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139