Declaring a font-size of 1em in the css body conflict with any browser's interpretation?
Or should I use a value of 100%.
Thanks
Declaring a font-size of 1em in the css body conflict with any browser's interpretation?
Or should I use a value of 100%.
Thanks
If you mean a choice between:
and:Code:body { font-size:1em; }
Both are meaningless but, 100% is a safer 'meaningless'.Code:body { font-size:100%; }
Think about it though. 1em means 1 of the size of the font size in effect. 100% means all of the size of the font size in effect. They both are like telling the browser:
"As far as font size goes, what you are doing already is fine, make no change."
100% is safer only because IE sometimes gets confused with em's and font size. Therefore, em's should only be used for dimensions due this shortcoming.
If you want 100% or 1em as a font size, don't declare it, it is the default.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Not quite. An em is literally the height or width of the lowercase character "m" in the current font. Some letters are taller than "m," so the actual font size is usually about 1.2em.Think about it though. 1em means 1 of the size of the font size in effect. 100% means all of the size of the font size in effect. They both are like telling the browser:
"As far as font size goes, what you are doing already is fine, make no change."
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Thanks,
I now that makes alot more sense.
On another note, does IE 7 suffer the same problem with the fault box width/height issue. Or is IE 7 compliant in the box model.
Yes, it still suffers from it.
Microsoft haven't really made an effort with IE7's compliance, just patched over a few of the most annoying minor problems.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks