Click to See Complete Forum and Search --> : Best font sizing scheme?


mordie
06-01-2005, 09:28 PM
What is the most recommended way to set font size for my Web site?
I would like my users to be able to resize the text on my pages via the View>Fonts feature in IE or the View>Text Size feature in Firefox.

I'm using a stylesheet with the font set to "100%" and in my pages I have CSS styles such as style="font-size: 1em."

Thing is, my XHTML 1.0 validates. It looks great in IE but comes out way too large in Firefox.

What's going on and what to do about it?

invertedpanda
06-01-2005, 09:38 PM
Thats odd.

Here is an example of how I do fonts:


.sechead1 {
font-family: verdana,helvetica;
font-size: 12px;
letter-spacing:1px;
color: #FFF;
}


In Windows I have no issues. Linux/BSD/etc users will obviously have some issues, because most Linux users don't have truetype fonts, and the various rendering engines in browsers do different things to em' - that's why I have helvetica chosen as a backup font, because it displays properly (generally speaking) in most X-based browsers.

Bluetagpizza
06-01-2005, 09:58 PM
I like to use "pt" instead of "px" when possible. I think it's more accessible.

mordie
06-01-2005, 11:11 PM
So what is it that lets your users adjust the font size in their browsers? I thought it was a quirk of IE that setting font-size in specific units like px or pt makes adjustment impossible for users.


Thats odd.

Here is an example of how I do fonts:


.sechead1 {
font-family: verdana,helvetica;
font-size: 12px;
letter-spacing:1px;
color: #FFF;
}


In Windows I have no issues. Linux/BSD/etc users will obviously have some issues, because most Linux users don't have truetype fonts, and the various rendering engines in browsers do different things to em' - that's why I have helvetica chosen as a backup font, because it displays properly (generally speaking) in most X-based browsers.

fredmv
06-02-2005, 12:31 AM
I've always seemed to do well with em, but to each their own.

Stephen Philbin
06-02-2005, 01:56 AM
I thought it was a quirk of IE that setting font-size in specific units like px or pt makes adjustment impossible for users.

You thought correctly. Personally I don't usually denote font size. I just leave it entirely down to the user preferences to handle. You should probably check on other peoples installs of Firefox to make sure it isn't just yours that's making the font a bit larger than you would like. Besides, better slightly toobig than too small.

Fang
06-02-2005, 03:08 AM
Originally Posted by mordie
I thought it was a quirk of IE that setting font-size in specific units like px or pt makes adjustment impossible for users. You thought wrong!
Users can override any font family, size or color to their own requirements using browser options.
Care with font sizes (http://www.w3.org/QA/Tips/font-size)

Stephen Philbin
06-02-2005, 03:14 AM
Looks like I thought wrong too then. I could have sworn IE couldn't resize absolute font sizes.

Fang
06-02-2005, 03:26 AM
IE Tools > Internet Options... > (tab)General - Accessibility
There is also; Trixie (http://www.bhelpuri.net/Trixie/Trixie.htm) for IE and Greasemonkey (http://greasemonkey.mozdev.org/) for Mozilla and Opera, for changing specific sites.

mordie
06-02-2005, 10:17 AM
What a fool I am!

I do a half-day search of the Internet for information on how best to specific font size, post in numerous forums, and start researching other sites. After all that the best information is on the W3C's own Web site. I should have looked there to begin with.

Thanks, Fang, for the tip. Thanks, webdeveloper.com.