1. Computing & Technology

Discuss in my forum

Using font-size 0 in Various Web Browsers

By , About.com Guide

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.

©2012 About.com. All rights reserved.

A part of The New York Times Company.