开发者

2 div are coming horizontally in same in all except IE6? how to solve?

2 divs are coming horizontally in same 开发者_JAVA百科in all except IE6? but in IE 6 second div is falling under first div. both div has fixed width and float:left

this is code of container div

#home2colContainer {margin-top:40px;overflow:hidden;width:1000px;}

this is for first div

#home2colLeftColContainer {float:left;margin-left:20px;width:675px;}

and this is for second div

#home2colRightColContainer {float:left;margin-left:30px;margin-top:9px;width:268px;}


Try absolutely positioning the second one horizontally, and absolutely relative to the first vertical.


I believe you are dealing with the double margin bug ( http://www.positioniseverything.net/explorer/doubled-margin.html ) ..

Add display: inline; to your home2colLeftColContainer and it should work..


problem is solved

I added _display:inline to #home2colLeftColContainer

#home2colLeftColContainer {float: left; margin-left: 20px; width: 675px;_display:inline}

and _margin-left: 15px to #home2colRightColContainer

#home2colRightColContainer {margin-top: 9px; float: left; margin-left: 30px; _margin-left: 15px; width: 268px}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜