Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent scaling text size in (IE) browsers? 1

Status
Not open for further replies.

dkdude

Programmer
Jun 16, 2003
849
DK
Hi,

Can anyone tell me how to avoid the text scaling when A user selects another text size in IE -> View->TextSize-> ...

Hint : This page looks like it doesn't care which text size the browser in configured to use:


Thanks


Jakob
 
I Remember deecee, I think it was, saying that "If you specify your text in a style the user cannot adjust the font size(period).".. so it looks like CSS is the answer :¬)
 
The user can always override any CSS class.

You can add an !Important declaration to the class so that the font will only resize when the user genuinely needs it to. Afterall, why prevent a user from making the text larger if they cant read it when its small?

Another way is to specify your text sizes as pixels, rather than points.

For more info on the !Important declaration:


Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Thanks Wullie,

Tried it out : px works, where as pt scales the text size just as you said it would. (like this site that will NOT scale any text sizes).

WHY I want to do it? I use some chars as fancy decoration in a layout, and I don't want that part of it to scale §;O)

Of course

The !importantant declaration is good stuff to know!!

Regards


Jakob
 
Also, that's just IE's behaviour. AFAIK IE 6 will scale everything but specific px font sizes. IE 5 will scale less things.. (not sure about specifics).

Other browsers will scale anything for you. Eg firebird scales the text on this site as I need it. [spin2]

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
So I guess that there is no way you can rely on regular chars used as decoration / text-art to look the same in all browsers / settings!

So I have to stick to graphics if I need things NOT to scale ever?

Thanks §;O)


Jakob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top