Using font-size 0 in Various Web Browsers

The CSS specification does not indicate how browsers should display text when the font-size is set to a value of zero (font-size: 0;). What this means is that many browsers handle it unpredictably.

  • Mozilla and Netscape 7: doesn't display the text
  • IE for Mac and Safari: the text is displayed at the default size as if there were no font-size property
  • Opera: the text is small, but still legible
  • IE for Windows: displays the font at an illegible size, but still visible

    If you are trying to hide text on a page, you should instead use the display: none; property. This will insure that it disappears no matter which browser you're using.