You are here: Clearing floaters in Mozilla « HTML « IT news, forums, messages
Clearing floaters in Mozilla

Posted by Andrey Tarasevich on 11/12/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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация