开发者

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

开发者 https://www.devze.com 2022-12-17 09:05 出处:网络
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

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

精彩评论

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