Still pretty new at all-CSS layouts, but loving it.

I have a question related to decisions that are made when "first starting a
new project".

I am aware that using em as a font size unit is a "Best Practice".  We want
people to be able to resize their text, and ems allow us to give them that
ability, consistently.  

Per this article:

http://www.clagnut.com/blog/348/

If I set

BODY {font-size:62.5%}

Then I am now starting out with (assuming a setting of "medium" in the
browser) a default font size equivalent to 10px for my entire document...
And "numbers that are easy to work with", because a setting of

{font-size:1.2em}

Is equivalent to 12px.

This is really nice, because I still tend to think of font settings in px,
and it's nice to be able to think in px but write in ems.

The problem I have comes when I go further into the blog article, and I set
up my "containers" and set "default" font sizes there.

For example, if I set #contentArea{font-size:1.2em} then I get my desired
12px font size for my body text.

The article then says, 


"
In Mozilla-based browsers, all heading elements in our aforementioned
#main_content div will be displayed at 12px whether they are an H1 or an H6,
whereas other browsers show the headings at different sizes as expected.
Applying text-sizes to all headings will give consistency across browsers,
for example:

H1 {font-size:2em}  /* displayed at 24px */
H2 {font-size:1.5em}  /* displayed at 18px */
H3 {font-size:1.25em}  /* displayed at 15px */
H4 {font-size:1em}  /* displayed at 12px */ 
"

ACK!  My "easy to work with numbers" now appear to be gone... Because 2em is
equivalent to 24px, not 20px as expected.  1.5em = 18px instead of 15px,
etc.

My question... Why is this?  And what is everyone else doing to work easily
with font sizes, while not having to turn around and specify a font size on
most of the elements in their document?  Is anyone else using this
technique, and if so, can you provide some info on how you work with it on a
daily basis?

Thanks for helping a still-relative-newbie!!

Marc

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to