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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent browser font size changes? 2

Status
Not open for further replies.

dakota81

Technical User
May 15, 2001
1,691
US
Internet Explorer works well when you specify font sizes by pixels, but Mozilla still lets the font sizes change when selecting text zoom from the menus.

It's not so big a deal, our site's traffic is >90% IE, but it would be nice to know if & how the font can be fixed in size.
 
Because more times than not it's by accident that the font size is raised or lowered - and hence the web site looks much worse.

And besides that, we sell printer ribbons for high-end printers, our customer base by default has good eye-sight as they make their money from computer graphic design.

We feel there is far more benifit than harm.
 
You could make each page one big picture, but it might be a pain to edit; but then you wouldn't need to worry about monitor resolution either! [dazed]
 
the key here is CSS -- do some font reasearch in CSS and if you have questions come back and we (i) will gladly answer.
 
Because more times than not it's by accident that the font size is raised or lowered

How do you know?

Anyway, as far as I know, there's no way to stop Mozilla resizing text when users ask it to, unless you follow smah's suggestion - which I sincerely hope was a joke. Try to design your site to cope with possible different text sizes - use ems instead of pixels when declaring dimensions, for example. It may be difficult redesigning your site to cope with the requirements of the internet, but it's a lot more tricky redesigning the internet to cope with your site.



-- Chris Hunt
 
As someone who works on a VERY LARGE monitor with an even larger resolution, I can't stand that do not allow you to resize the text. 10 point on an 800x600 screen is very different than 10 point on a 1600x1200 screen, and is REALLY different on a 3200x2400 screen.

Save my eyes and allow me to resize the text!

-Brian-
I'm not an actor, but I play one on TV.
 
IMHO This goes back to the basics of design... know your target audience and design accordingly. It is a principle far older than the web.

So if your target is broad... design a site that can accomodate everyone, but if your target is narrow you do not need to accomodate everyone, just your target :).

That said you could always place a "Best viewed in IE" line on there somewhere, but I would say if 90+% of your traffic is IE then design it so it "fails gracefully" if the fonts are enlarged in Mozilla (through the CSS as suggested). If it is really important do a javascript browser check and use a different style sheet if Mozilla is detected.

Just my two cents...

Wow JT that almost looked like you knew what you were doing!
 
pixl8r said:
If it is really important do a javascript browser check and use a different style sheet if Mozilla is detected.

If it's really important, use css 'hacks' to write moz-specific code.

Javascript won't work if the user has javascript switched off, and a browser-detect may fail if the user has changed their UA string (easily done in Moz and Opera, doable through a reg-hack in IE).

An example of Moz specific code:
Code:
body {font-size: 90%;}
[COLOR=red]*>[/color]body {font-size: 12px;}

The key is the child selector (>) - IE doesn't understand it, and so doesn't process the statement.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
If javascript is not enabled you are of course correct that a detect wouldn't work.

Personally I choose not to design or develop to that level of "what if's". If my web page works correctly in 90% of the browsers I am targeting then I am happy. You can nickel and dime yourself into the poorhouse worrying about users that have altered their browsers or have chosen to disable javascript, etc, etc...

That is interesting stuff about the Moz specific styles though!

Wow JT that almost looked like you knew what you were doing!
 
Technically, it's not a moz-specific hack, but a standards-specific hack.

IE doesn't understand the child selector property, but almost all standards based browsers (Opera, Moz, Konqueror, etc ad-nauseum) do.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Still very handy stuff... have a star :)

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top