Sent by Ondrej Ivanic on 10 September 2002 15:03
Tuttle Grey wrote:
>> For IE is good idea insert a comment:
>> <div class="spacer"><!-- --></div>
>> or use <br class="spacer" />
>
>
> Can you please explain why that comment is necessary for IE5?
IE sometimes (= some builds of IE5.x) insert an empty text node into DOM
as a child of a <div> element.
<div style="clear: both"><!-- --></div> is 'identical' with
<div style="clear: both; font-size: 1px"></div>, but height of first
<div> is allways 0px and height of second <div> is a 1px (sometimes 0px).
<div style="clear: both;"></div> is identical with <br clear="both">
This trick was a solution for 'moving-margins' bug:
http://www.sovavsiti.cz/css/moving_margins.html
--
Ondrej Ivanic
[EMAIL-REMOVED])