Hello, I am wondering what the advantage of using em is over pixel and what benefit resetting the default font size in the body to 62.5% is. Also how come google and yahoo don’t use em or 62.5%. thanks
@CentauriApr 17.2008 — #The advantage of setting font size in px is that you [B]know[/B] that is the size it will be (initially) displayed at - the disadvantage is that [I]stupid[/I] browsers (IE) will not allow the user to resize text specified in px.
The most common browser default text size is 16px, and setting the base size to 62.5% gives a size of 10px - this then makes correlation between ems and pixels easy to calculate (1em = 10px, 1.5em = 15px etc). Where the browser and/or user sets the default text size to anything other than 16px, these sizes will then no longer apply.
@tiki16authorApr 17.2008 — #Thanks for the replies. Is there any reason why google and yahoo haven't adopted this practise? Also, what is the point of font=100% in the html tag?
@agallochApr 17.2008 — #Thanks for the replies. Is there any reason why google and yahoo haven't adopted this practise? Also, what is the point of font=100% in the html tag?
thanks[/QUOTE]
You never want to use font tag in the HTML tag. In fact, just forget about the whole font="blah blah". Just use css.
I think the reason Yahoo and Google don't have much need for ems or percentages is because their sites are mostly visited by tech savvy people. Their main audience isn't 60+ year olds who might have vision problems, and might need to enlarge their text. Just my 2 cents.
@TJ111Apr 17.2008 — #I use 100% default font size, and then size everything accordingly. Using 62.5% has some weird cross-browser quirks. Here is a great article on the topic, as well as how to fix all the little quirks and stuff. http://www.alistapart.com/articles/howtosizetextincss