SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    May 2002
    Location
    Brandon, MS
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS-P alignment problem

    Iím attempting to use CSS-P on a site redesign. The top section of the page has three images side by side, inside a div, with no wrap. The page needs to be fluid with the right most image always staying all the way right. The only way Iíve been able to do this is to set the first two images to align left and the third image to align right. This works except there are spaces added between the images and the background-color set for the div containing the images is ignored. Is there a better way to do this? I donít what to use absolute positioning. Iím testing the site in IE 6.0.

    site link -
    http://www.madisonfirstchog.org/newindex.htm

    <style type="text/css">
    <!--
    body {
    margin: 0px;
    padding: 0px;
    }
    .header {
    white-space: nowrap;
    background-color: #CCCC99;
    }
    -->
    </style>
    </head>
    <body>
    <div class="header">
    <p><img src="images/headerL.jpg" width="263" height="148" align="left" />
    <img src="images/headerMid.jpg" width="358" height="148" align="left" />
    <img src="images/headerR.jpg" width="129" height="148" align="right" /></p>
    </div>
    </body>
    </html>

  2. #2
    Put your best practices away. The New Guy's Avatar
    Join Date
    Sep 2002
    Location
    Canada
    Posts
    2,087
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    The header div need hieght otherwise the images spill out of the div, and you get that white space your talking about.

    Code:
      .header {
       white-space: nowrap;
       background-color: #CCCC99;
     height: 148px;
      }
    Also you dont need the <p> tag, unless you want the space on top?
    "A nerd who gets contacts
    and a trendy hair cut is still a nerd"

    - Stephen Colbert on Apple Users

  3. #3
    SitePoint Zealot
    Join Date
    May 2002
    Location
    Brandon, MS
    Posts
    110
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That works! Thank you very much.


Bookmarks

Posting Permissions

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