Thursday, December 18, 2008

Zero Font Size

Each of the major browsers render text of zero units (or percentage) differently. Firefox 3 does not display the text. Internet Explorer 7 and Internet Explorer 6 render the text with a height of 1 pixel. Opera 9.6 does not display the text. Safari 3.1 renders 0em , 0ex and 0% text with a text size of 9px and renders text of 0px and zero absolute length units with a height of 1px.
Examples:
<p style="font-size: 0em;">jumps over the lazy dog</p>
<p style="font-size: 0ex;">jumps over the lazy dog</p>
<p style="font-size: 0%;">jumps over the lazy dog</p>
<p style="font-size: 0px;">jumps over the lazy dog</p>
<p style="font-size: 0pt;">jumps over the lazy dog</p>
<p style="font-size: 0mm;">jumps over the lazy dog</p>
<p style="font-size: 0cm;">jumps over the lazy dog</p>
<p style="font-size: 0in;">jumps over the lazy dog</p>
<p style="font-size: 0pc;">jumps over the lazy dog</p>

No comments: