Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: not2easy
Because of browser weirdness 100% is sometimes interpreted differently by different browsers, so in your style sheet use:
Then you can define your font sizes for your page, if you want to define all your <p> tags as a fixed size:
Though I'm not a big fan of fixed pixel sizes, there are so many different people, eyes over 40, eyes under 40, monitor sizes, browsers... I like to build in some flexibility. I like to use em's. They are based on 1.0em = 100%
So for a roughly 11pt font I'd define the <p> tag:
it's smallish, but scalable.
The really important thing here is to define the base size in the css body, that way you get rid of some unpredictable cross-browser base sizes.
Some people have also noticed weirdness with a doctype of html 4.0 transitional vs. xhtml 1.0 transitional, the xhtml being more consistent.
Use the unit em for font sizes instead.
I'm sorry if I'm saying something dumb in m,y first post here, but I don't understand what's wrong with using pixels as the size spec? So far, I've seen consistent agreement between browsers, but some disagreement when using points. Am I missing something? Please advise, thanks.
What's wrong with using pixels as the font size is that Internet Explorer does not allow the user to adjust the text size if it is defined in pixels. This is an accessibility problems because users with poor vision should be able to increase the font size in their browser settings accordingly. IE is broken in this sense.
Firefox is correct to allow users to increase the pixels size. If that breaks your page layout, it means you've done a poor job designing the page.
Also, do you think you can take over MY browser, over-ride MY preferences to make the page the way YOU want it rather than how I want it and keep my custom?
I think I'd discover very quickly that your competitor is a click away, wouldn't you?