homepage Welcome to WebmasterWorld Guest from 50.16.130.188
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
How do I keep text the same size on a web page?
Can I prevent viewers from changing the font size?
erdy




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

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




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

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




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

That doesnt work in every browser though.

Fotiman




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

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




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

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




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

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




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


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




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

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




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

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!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved