Re: Proper font-size calculation with ems (was RE: Image Galleries)

B.K. DeLong wrote:

> I would love to take all our font sizes in 
> http://ocw.mit.edu/OcwWeb/style/core.css
> 
> and convert them to ems. The problem I run into is inheritance and 
> nesting. 

It's not just a case of changing any px references to ems. You need to 
have a good look at the CSS and your typical page structure and let 
inheritance work *for* you, rather than against you. E.g.: not studied 
your CSS in any detail, but there are a lot of font-size:11px rules 
there. If you wanted to change to ems, you wouldn't replace all those 
with font-size:0.75em (as yes, that would get you into inheritance 
problems), but rather set the font-size for the entire page (on the body 
element) to 0.75em and remove any further size declarations for all the 
elements, classes, etc that are to be displayed at this default size. To 
sum it up in a few words: you want to set the font size at the highest 
possible level within the document tree.

Hope that makes some kind of sense...
-- 
Patrick H. Lauke
_____________________________________________________
re·dux (adj.): brought back; returned. used postpositively
[latin : re-, re- + dux, leader; see duke.]
www.splintered.co.uk | www.photographia.co.uk
http://redux.deviantart.com

Received on Wednesday, 5 January 2005 14:44:03 UTC