> I think Tim's concise explanation helped with that understanding.

I didn't send that to the entire list, because the website that got sent out 
right before I finished it said pretty much the same thing, but if it was that 
helpful, I'll share it with everyone.

Rules of thumb:

"em" is like a variable that means "font-size." if the base font-size is 16px 
(default) then 2em is 32px, .5em is 8px.

The difference is what the percentage is relative to.

For font-sizing, the percent is relative to the font-size, so they both do the 
exact same thing. Font-size:2em is the same as font-size:200%. Use which ever 
you like.  It doesn't matter.

For box sizing, em is still the font-size.  But percent is relative to the 
container.  If you want the box size to change with the font use ems. (ex. if 
you have a box that you want to always display 3 lines of text then set it to 
3.6em -- the height of a line is generally 1.2em, unless you specifically set 
it to be otherwise)

If you want the box to change size with the screen, use percents (height:50% is 
50% of the parent container - sometimes the window, sometimes something else, 
never the font-size)

---Tim

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to