tags:

views:

33

answers:

1

What are the advantages and disadvantages

+1  A: 

http://css-discuss.incutio.com/wiki/Using_Ems

"They are resizable in all Web browsers that support resizing, they are specified relative to the user's font size preferences, and can therefore adapt to the viewer's screen."

and more...

dale
http://css-discuss.incutio.com/wiki/Using_Font_Size also has a nice comparison of the different options
Tim Fountain
so, thats it, they just adapt the the browsers default font? meh, any reason I shouldn't stick with pixels? only old people really change their font size
DerNalia
"only old people really change their font size" -- still laughing
kekekela
I set the base font size in pixels and size with percentages after that. I've heard percentage values render more consistently across browsers. Check out http://developer.yahoo.com/yui/3/cssfonts/ By the way, I'm 24 years old and constantly resize text. Old people aren't the only ones with poor vision ;)
Bryan Downing
@DerNalia: Wrong. People don't change font size because a) it doesn't work when everyone is using the `px` unit and b) text becomes too small because people tend to set `font-size` to `.75em` or similiar when they *do* use `em`s.
You
@Bryan: Setting the base size in pixels is exactly what you shouldn't do. Ideally, base size should be `1em`; but any value specified in `em`s will do. Otherwise, some browsers (IE) break.
You
Corollary question: Is there any particular reason to use em over ex?
Brian S
@You: I prefer this method (base font set in px with an IE adjustment). http://developer.yahoo.com/yui/build/fonts/fonts.css
Bryan Downing
@Bryan: CSS hacks should be avoided whenever possible; you never know if new browsers will be affected by the same hack when you don't want them to, or possibly go unaffected when you actually need the hack. It is not futureproof.
You