Forum Moderators: not2easy
In CSS, when you use pixels or points, the text size will not adjust when the text size in the browser is changed.
I have a few pages where I use HTML to specify font size and I am also using CSS to specify font size on the same page so when I change text size in a browser some of the text is changing and some is not.
Is there anything I can do in my coding of font size in CSS so the size of the text specified with CSS also adjusts? I need help with inline CSS. I am working with Trebuchet MS size="2".
This would really help me.
The best course of action for you is to use em's or percentages.
Personally I set the font-size in the body as a percentage (62.5% in case you're wondering) and then use em's everywhere else. At the above percentage 1.2em equals 12px and so on.
I'm myself not a fan of the 62.5% font sizing.
Browsers can have user specified settings overruling your fonts and/or specify a minimal font size to be used.
Modern browsers (like e.g. FF3) allow the user to zoom in and out way beyond your control, which is a good thing.
Remember that font sizes that you force to be small are potentially an accessibility problem for those in need of a larger font.
In HTML, when using size 2 in trebuchet ms it is equal to 10pt or 17px. When I use trebuchet ms in css on the same page (because I have to use CSS and also HTML on a couple of pages) what percentage should I set the font size to so when I change the text size in a browser (IE, Mozilla) the text defined by CSS looks the same size as the HTML defined text?
How do you figure this out? It is a little frustrating.