views:

72

answers:

3

2 divs are coming horizontally in same 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;}
A: 

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

Arlen Beiler
i will do this at last
metal-gear-solid
A: 

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..

Gaby
i've tried this already. tried again. nothing happens
metal-gear-solid
A: 

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}
metal-gear-solid