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
2010-08-10 18:26:27
http://css-discuss.incutio.com/wiki/Using_Font_Size also has a nice comparison of the different options
Tim Fountain
2010-08-10 18:28:20
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
2010-08-10 18:28:37
"only old people really change their font size" -- still laughing
kekekela
2010-08-10 18:34:16
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
2010-08-10 18:34:43
@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
2010-08-10 18:36:11
@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
2010-08-10 18:38:06
Corollary question: Is there any particular reason to use em over ex?
Brian S
2010-08-10 18:44:56
@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
2010-08-10 19:21:10
@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
2010-08-11 00:18:07