Results 1 to 3 of 3

Thread: IE6 Displays Unexpected Break Between Page Elements

  1. #1
    Join Date
    Sep 2006
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default IE6 Displays Unexpected Break Between Page Elements

    I'm having trouble with this layout.
    IE displays the first review div and h2 correctly without a gap in between but then puts a gap in between all the rest of the review divs and their corresponding headers.
    Here's the CSS.

    View the page here.

    Code:
    /*Review Divs*/
    .summary{
    border: 1px dashed black;
    padding:2px;
    width:220px;
    margin-bottom:5px;
    }
    .review{
    border-style:solid;
    border-width:15px;
    border-top:none;
    padding:5px;
    margin:0px;
    margin-bottom:10px;
    clear:both;
    }
    .numberone{
    border-color:#066;
    background:#dae9e9;
    }
    .even{
    border-color:#ddd;
    background:#eee;
    }
    .odd{
    border-color:#999;
    background:#ddd;
    }
    /*End Review Divs*/
    
    /*Review Headers*/
    h2{
    margin:0;
    width:100%;
    }
    
    h2 a:link, h2 a:visited{
    text-decoration:none;
    padding-left:4px;
    float:left;
    font-size:21px;
    }
    
    h2 a:hover{
    text-decoration:underline;
    background:none;
    }
    
    h2.numberone{
    background: #066 url(images/bluebar.gif);
    float:left;
    }
    h2.numberone a:link, h2.numberone a:visited{
    color:#fff;
    }
    
    h2.even{
    background: #ddd url(images/lightgraybar.gif);
    float:left;
    }
    
    h2.even a:link, h2.even a:visited{
    color:#000;
    }
    
    h2.odd{
    background: #999 url(images/darkgraybar.gif);
    float:left;
    }
    
    h2.odd a:link, h2.odd a:visited{
    color:#000;
    }
    
    /*End Review Headers*/
    
    /*Review Images*/
    h2 img{
    float:right;
    margin-top:5px;
    }
    /*End Review Images*/
    Thanks for any help.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Style often cannot be accurately evaluated without the corresponding markup. A link to your problem page would really help us see, and therefore figure out this problem.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Use this css to remove the space inbetween them at all on all browsers and then simply insert <br>'s in between the review divs and you'll be good to go.

    Code:
    /*Review Divs*/
    .summary{
    border: 1px dashed black;
    padding:2px;
    width:220px;
    margin-bottom:5px;
    }
    .review{
    border-style:solid;
    border-width:15px;
    border-top:none;
    padding:5px;
    margin:0;
    clear:both;
    }
    .numberone{
    border-color:#066;
    background:#dae9e9;
    }
    .even{
    border-color:#ddd;
    background:#eee;
    }
    .odd{
    border-color:#999;
    background:#ddd;
    }
    /*End Review Divs*/
    
    /*Review Headers*/
    h2{
    margin:0;
    width:100%;
    }
    
    h2 a:link, h2 a:visited{
    text-decoration:none;
    padding-left:4px;
    float:left;
    font-size:21px;
    }
    
    h2 a:hover{
    text-decoration:underline;
    background:none;
    }
    
    h2.numberone{
    background: #066 url(images/bluebar.gif);
    float:left;
    }
    h2.numberone a:link, h2.numberone a:visited{
    color:#fff;
    }
    
    h2.even{
    background: #ddd url(images/lightgraybar.gif);
    float:left;
    }
    
    h2.even a:link, h2.even a:visited{
    color:#000;
    }
    
    h2.odd{
    background: #999 url(images/darkgraybar.gif);
    float:left;
    }
    
    h2.odd a:link, h2.odd a:visited{
    color:#000;
    }
    
    /*End Review Headers*/
    
    /*Review Images*/
    h2 img{
    float:right;
    margin-top:5px;
    }
    /*End Review Images*/

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
  •