Helpful Information
 
 
Category: CSS Help
Font size in CSS

I've got several layers in "boxes" with text in it, that means that the text MUST fit into these boxes.

I've found out that you can set the font-size with Cascading
Style Sheets that it can't be changed by the browser
(In IE you can choose if you want bigger or smaller font
size).

But now a tester told me that if you choose bigger fonts
in MS Windows (display properties, where you set up your
graphics adapter) the font-size in CSS is BIGGER while
"normal" HTML is not changing in size.

Is there a possibility to find out if a user got bigger
fonts activated or is there another "trick" so that the
font size is (mostly) ALWAYS the same (while not using
images) ?

The most effective way that I'm aware of is specifying the fonts in pixels -- which will pretty much display universally one way. For example, if you want "Hello and welcome to my site" to be displayed in the same size, use something like <span style="font-size : 11px">Hello and welcome to my site</span>. That should fix the problem.

Happy coding!

JensK,

Colin's right, that will force the browser to render the text in the size that you want. just be careful not to put the px size too small, we've had problems with text not being legible under about 10px (in netscape--in IE it was fine at 10px) in arial. this may have been a specific situation, but better safe than sorry...in the end, just check and recheck to see what's acceptable. ;)

jason ;)
http://www.theartofsynapse.com










privacy (GDPR)