On 2014-04-18 17:53 (GMT+0100) Tim Dawson composed:

I've been following another thread (Phone breaks....), and I can see the 
advantage of using
'ems' rather than pixels for media queries.

So if I'm using 'px' now but would like to change to 'em', how do I calculate 
how many 'em' to
allow for my 960px starting point ?

Most browsers ship with a 16px default font size, making one rem unit 16px. Unless you change it, an em will remain 16px on body for most users. So simply divide 960 by 16 to get 60em if you haven't made a change, or use 60rem if you have. For users whose default is not 16px, the em will scale to whatever that size happens to be, which is the beauty inherent in using em, allowing your design to remain intact while the content size automatically scales to what the user needs and/or wants for optimal accessibility and usability, not to mention friendliness.

http://www.impressivewebs.com/understanding-em-units-css/
--
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

  Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***  http://fm.no-ip.com/
______________________________________________________________________
css-discuss [css-d@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