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: