1. Home
  2. Computing & Technology
  3. Web Design / HTML

Using font-size 0 in Various Web Browsers

By Jennifer Kyrnin, About.com

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.

More Web Design / HTML Quick Tips

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2008 About.com, a part of The New York Times Company.

All rights reserved.