-----Original Message-----
From: Climis, Tim [mailto:tcli...@indiana.edu] 
Sent: Thursday, March 19, 2009 9:04 AM
To: 'Rob Emenecker'; 'David Laakso'
Cc: 'css-d'
Subject: Re: [css-d] [OT] EMs vs. PERCENTs

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)

--

GREAT explanation!

So, is it uncommon, or bad practice, to use both in this situation?

{height: 7.2em; width: 20%;}

To give you a menu with six lines (no matter what size type) but still only
occupying 20% of the parent container so it scales with window size.

Mike

______________________________________________________________________
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