Fri, 2004-05-21 07:11
I'm having a very annoying and simple problem. Why following code does not work:
#Top { float : left; width : 100%; height : 50px; background-color : #ddeeff; } #Top2 { float : left; width : 100%; height : 50px; background-color : #ffeedd; } #Box { position : absolute; top : 200px; left : 20px; border : 1px solid #000; padding : 10px; }
HTML part:
<DIV ID="Top"> Hello world! </DIV> <DIV ID="Top2"> Hello world!! </DIV> <DIV ID="Box"> Box </DIV>
In Mozilla 1.6 and Opera 7.23 Everything works just fine. But in Internet explorer 6 I don't see the box at all!
Fri, 2004-05-21 08:23
#1
Two floats and absolute (IE 6)
Hi
Just add clear:both to the #box style
Trevor
Fri, 2004-05-21 08:30
#2
Two floats and absolute (IE 6)
Problem solved. Thanks!
Sun, 2004-05-23 13:09
#3
Two floats and absolute (IE 6)
Alternatively you could just remove the floats? What is the need for floating an element that is 100% width?