开发者

negative margin effecting DIV in IE8?

http://chocolatvitale.com

in IE 8 the slideshow at the top overflows to exactly below the div its supposed to be contained inside. does it have something to do with the negative margin?

Container div:

#header{
   background:#190000;
   width:1024px;
   height:216px;

}

Slideshow divs:

.slideshow { 
    float:left;
    height: 216px;
    width: 1023px; 
    margin-top:-192px;
    overflow:hidden;
    z-index:1; 
}

.slideshow img {
    padding: 0 0 0 0;
    height:216px;
    width:10开发者_StackOverflow社区23px; 
    border: none; 
}


Yes, it does. Your negative margin is moving your .slideshow container up 192px, which puts it basically out of view. Only 24px of each image is showing:

216px height - 192px margin = 24px visible

If you remove the negative top margin from the CSS, it will display correctly:

.slideshow { 
    float:left;
    height: 216px;
    width: 1023px; 

    overflow:hidden;
    z-index:1; 
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜