SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Jun 2003
    Location
    Barrie, Ontario, Canada
    Posts
    316
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Background colour not displaying in IE

    Hi all,

    I have a weird issue where the background-colour of a div is not displaying in IE6. The html:
    Code:
    <div class="post alt">
         <div class="postleft">
              <h3><a href="http://www.bonniesamplehomes.com/?p=18" rel="bookmark" title="Permanent Link to 27 Mill Street">27 Mill Street</a></h3>
    	   <small>July 24th, 2006</small>
    	   <img class="thumb" src="http://www.bonniesamplehomes.com/wp-content/uploads/2006/07/mill-street.thumbnail.jpg" width="96" height="75" title="27 Mill Street" alt="27 Mill Street" />			     </div>				
         <div class="postright">
               <p>Unique 4-level sidesplit with large foyer which opens to the family room with walkout to a 2-level deck. Separate living & dining rooms. Great kitchen with separate breakfast area & walkout to upper deck. 3 bedrooms, 1.5 bath. Master has ensuite. Lower level den/office. Lots of storage & rough in for 3rd bath. Great location.</p>
              <p><a href="http://www.mls.ca/PropertyDetails.aspx?vd=&SearchURL=%3fPage%3d5%26ID%3d85945%26Mode%3d7&Mode=7&PropertyID=4876542">View MLS Factsheet</a>.</p>
         </div>
    </div>
    The site in question is here: http://bonniesamplehomes.com. Every other div is given an "alt" class, which I then style with a background-color. The css:
    Code:
    .post { overflow:hidden; padding:10px 0; margin-bottom:10px; }
    .postleft { 
    	margin:10px 0 0 10px;
    	float:left; 
    	width:135px;  }
    .postright { 
    	margin-right:10px;
    	float:left; 
    	width:235px;  }
    .postright p { font-size:0.7em; line-height:1.4em; }
    .alt { background-color:#fffbec; }
    For some reason, this is not working in IE. Any ideas?

    Thanks in advance.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,513
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    HI,

    Same answer that was just given a minute ago. The elemnt lacks "layout" see faq on "haslayout" for more info.

    You need to force layout with a dimension (or the height:1% hack.)

    Code:
    .post {width:100%; overflow:hidden; padding:10px 0; margin-bottom:10px; }

  3. #3
    SitePoint Addict
    Join Date
    Jun 2003
    Location
    Barrie, Ontario, Canada
    Posts
    316
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I swear I did a search first

    Thanks a lot.


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
  •