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!

No user can change the text size of the page??

Status
Not open for further replies.

ayanroy

Programmer
Oct 20, 2002
22
EU
friends,

u must have seen the hotmail site. when user wants to increase the text size of the webpage, it does not change.

IE has a option view-->text size--> largest ... smallest

in hotmail site, it does not work.

I have tried all the posibilities using CSS, but failed,

anyone has any solution????


 
although, you should note that anyone with even a decent knowledge of their browser can still change the text size, even for hotmail.
There is no real way to limit this, cept put everything in an image??



É ::
 
Response to cian -

You can get around that too by using the !important tag along with your size declaration, like:

font: 12px !important;

That will always overwrite any user defined sizing. Probably don't have to worry about this though, as the common user has no clue how to set up those kinds of custom settings.
 
dakota81,

Sorry to tell you but a user can always override the style settings, after all, it is their machine.

A user defined stylesheet can also contain an "!important" declaration which overrides any that you specify.

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Atleast for Avenroy, the !important tag can still keep precedence over some users' own css definitions, so it's better. I had to look up the rule to make sure for me - my reference book apparantly uses CSS1 (as it was published in 1998). I don't do too complicated stuff, so I'll stick with it anyways. =)

Here's the text from
6.4.2 !important rules

CSS attempts to create a balance of power between author and user style sheets. By default, rules in an author's style sheet override those in a user's style sheet (see cascade rule 3).

However, for balance, an "!important" declaration (the keywords "!" and "important" follow the declaration) takes precedence over a normal declaration. Both author and user style sheets may contain "!important" declarations, and user "!important" rules override author "!important" rules. This CSS feature improves accessibility of documents by giving users with special requirements (large fonts, color combinations, etc.) control over presentation.

Note. This is a semantic change since CSS1. In CSS1, author "!important" rules took precedence over user "!important" rules.
 
I really like some of your input but I recommend people use em or percentage instead of px wherever they can so that people can enjoy resizing easily. :) Gary Haran
 
Two questions ayanroy - "Why would people want to resize the text on your page?" and "Why do you want to stop them?". -- Chris Hunt
Extra Connections Ltd
 
Guys,

I just got operated on both eyes. While gaining back my site bigger text size helps.

Doing anything to stop changing the text size hurts your site in a bad way. Gary Haran
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top