Welcome to WebmasterWorld Guest from 54.145.44.134

Forum Moderators: not2easy

Message Too Old, No Replies

How do I keep text the same size on a web page?

Can I prevent viewers from changing the font size?

     

erdy

9:58 am on Feb 20, 2007 (gmt 0)

5+ Year Member



Hello,

can anyone tell me how I can stop viewers of my sites from changing the font size. I realise this is not a great thing to do because of people who have sight difficulties but occasionaly it would come in quite useful.

Please help.

Regards

Erdy.

Lexur

10:06 am on Feb 20, 2007 (gmt 0)

5+ Year Member



You must define a STYLE. I.e.:

<STYLE="font-family:arial; font-weight:bold; font-size:12pt;">

Or, better, you should read somthing more about CSS basics.

[edited by: Lexur at 10:07 am (utc) on Feb. 20, 2007]

Angelis

10:38 am on Feb 20, 2007 (gmt 0)

10+ Year Member



That doesnt work in every browser though.

Fotiman

3:23 pm on Feb 20, 2007 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



1. What you're trying to do is very bad for accessibility. All you will accomplish is annoying those people who want to change the font size. Don't take away the people's right to choose.

2. If you're designing a site that is dependant on a particular font size, then you have a very poorly designed site.

3. What you're asking for can only be achieved in the IE browser (I'm not sure if this "bug" was fixed in IE7 or not). You will not be able to prevent all browsers from being able to change the font size, because most of them are smart enough to keep control at the viewer's end instead of the designers.

Instead of trying to figure out how to do this, you should spend your time learning about why you should NOT do this.

cmarshall

8:31 pm on Feb 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually, I've found there is no way to prevent modern browsers from changing text sizes. The only thing that you can do is override the user's default settings.

SuzyUK

8:54 pm on Feb 21, 2007 (gmt 0)

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



cmarshall is correct, there is no way this to do unless you use a graphic

Even IE have fixed their pixel resizing bug. Opera lets you overide any websites default by letting you set a minimum font size and all browsers have a zoom or text-resize feature

[edit] just to clarify the "bug" - IE6 and below won't let you resize if the text size is specified in px and was the last browser you could almost have relied on to do what you're asking

[edited by: SuzyUK at 9:00 pm (utc) on Feb. 21, 2007]

penders

10:10 pm on Feb 21, 2007 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month




Fotiman:
(I'm not sure if this "bug" was fixed in IE7 or not)

SuzyUK:
Even IE have fixed their pixel resizing bug. ...

[edit] just to clarify the "bug" - IE6 and below won't let you resize if the text size is specified in px and was the last browser you could almost have relied on to do what you're asking

Hhhmmmm... admittedly I have used IE7 very little - just to test - but I didn't think IE7 had solved this "bug" of refusing to resize text that had been defined in 'px' (via the menu... View > Text Size) ...?! The 'zoom' feature yes, but not the Text Size menu option. I specifically tried this recently with an old site where the font-size was defined in px throughout - the View > Text Size menu option did nothing in IE7. Are there later versions of IE7 that do sort the problem, or am I missing something?

Also mentioned in this thread:
[webmasterworld.com...]

Opera lets you overide any websites default by letting you set a minimum font size

Firefox too.

Setek

1:50 am on Feb 22, 2007 (gmt 0)

10+ Year Member



Hhhmmmm... admittedly I have used IE7 very little - just to test - but I didn't think IE7 had solved this "bug" of refusing to resize text that had been defined in 'px' (via the menu... View > Text Size) ...?! The 'zoom' feature yes, but not the Text Size menu option. I specifically tried this recently with an old site where the font-size was defined in px throughout - the View > Text Size menu option did nothing in IE7. Are there later versions of IE7 that do sort the problem, or am I missing something?

I was pretty sure this wasn't fixed also - but, at least, holding Ctrl and scrolling with the mouse wheel no longer changes Text size, rather, page zoom.

While IE 7's page zoom isn't as good as Opera's, it's better than nothing :)

SuzyUK

8:09 am on Feb 22, 2007 (gmt 0)

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I was pretty sure this wasn't fixed also - but, at least, holding Ctrl and scrolling with the mouse wheel no longer changes Text size, rather, page zoom.

Ah yes thanks for you correction, I was indeed just thinking about the zoom feature, as you say it's better than nothing!

 

Featured Threads

Hot Threads This Week

Hot Threads This Month