|
Posted by Andrey Tarasevich on 12/21/88 11:24
Hello
Consider the following simple piece of HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html style="width: 100%; height: 100%">
<body style="width: 100%; height: 100%">
<div style="width: 200px; height: 200px; background-color: #000; float: left"></div>
<p>Test</p>
<div style="background-color: #ccc; clear: all">Test</div>
</body>
</html>
In IE 6 the 'clear' property in the second <div> appears to work, i.e. the
second <div> is placed below the first one. In Mozilla 1.7.8 it is placed to the
right from the first <div>, i.e. it looks like the second <div>'s 'clear'
property is completely ignored.
Why is this happening? Which browser is behaving correctly? And if Mozilla's
behavior is correct, then what's is the proper way to clear the floaters by
using CSS properties?
I know that <br clear="all"> will work in Mozilla, but it has its own issues and
also I'd like to be able to do it through CSS properties.
--
Best regards,
Andrey
Navigation:
[Reply to this message]
|