Forum Moderators: not2easy

Message Too Old, No Replies

using font-size: 1px

why use this?

         

12inch

10:06 am on Sep 12, 2003 (gmt 0)

10+ Year Member



On serveral sites I see the code:

font-size: 1px;

What does this do?
I probably think it's a hack for something.

Anand

benihana

10:07 am on Sep 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it could well be to effectively hide text from users in an effort to boost search engine rankings.

SuzyUK

12:12 pm on Sep 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not all uses are bad ;)

Some browsers will use font-size to override the height of elements..

So you cannot specify an elements height at less that the font size, (not handy if you want to make a 2px high graphic line or the like...)

so the solution is to set font-size to 1px.. that covers all eventualities

Suzy