/    Sign up×
Community /Pin to ProfileBookmark

Disable Browsers’ Text Enlargement Command

Hello. I was wondering if anyone knows a concrete solution to block a user from tampering with the text size of your webpage through that users’ web browser commands?

Or, is this something that can not be overridden with basic programming?

Thanks much,

  • Master00
  • to post a comment
    CSS

    15 Comments(s)

    Copy linkTweet thisAlerts:
    @BonRougeMay 22.2005 — This is something you don't want to do (or even suggest!) There are accessibility issues here - users are able to increase the text size for good reasons - they may have sight problems - or just a small screen. You want to enable and empower people - not disable them. That's what the web's about. If you're scared of your layout breaking, then try to make a better, more flexible layout. For example, let's say you have a horizontal menu that is Xpx wide, it might break or look bad when the text-size is increased. what do you do to stop that? Use em instead - then the box will grow with the text and it won't drop to two lines or whatever you see as being the problem.

    I hope this makes sense and you can think more about [i]en[/i]abling than [i]dis[/i]abling users in the future.
    Copy linkTweet thisAlerts:
    @Master00authorMay 22.2005 — Thanks for the prospective, it makes perfect sense, and I do appreciate your post. That is something that I would consider, assuming it were a website which were to be offered publicly to an audience that could potentialy be offended by such a disablement. However, my client has specifically requested this alteration which I believe is because they will be posting printable information which must follow a precise company format which they don't want overridden.

    Any information would be appreciated. Thanks
    Copy linkTweet thisAlerts:
    @the_treeMay 22.2005 — You could just make a printable version of said page as a .pdf, but it's worth pointing out that if they refuse a larger sized version on request then they are violating the Disability Discrimination Act (in the UK) and/or Section 508 (in the US).
    Copy linkTweet thisAlerts:
    @BonRougeMay 22.2005 — ...which I believe is because they will be posting printable information which must follow a precise company format which they don't want overridden.[/QUOTE]
    But changing the text size on the screen won't affect how it's printed!

    If you don't want to make pdf files for printing (it's the most reliable format, but often seems like a bit of a pain as it takes Adobe Acrobat ages to open up) then you can make a print style sheet to format your page how you want for printing - either way, the text size on the screen won't affect how the page prints.
    Copy linkTweet thisAlerts:
    @Master00authorMay 22.2005 — ?? I just tested this and changing the text size through the browser command does effect the way it prints on my computer.

    I don't need a work-around, I need a script that will disable the browsers' text commands.
    Copy linkTweet thisAlerts:
    @CharlesMay 22.2005 — You cannot do that. The standard practice, in situations like this, is to provide two documents: an accessible version in HTML and a "printer friendly" version in PDF.

    The whole point of HTML is to provide information across different platforms. Presentation is secondary to the abilities and needs of the clients. On the other hand, the whole point of PDF is to suit the needs of control freaks.
    Copy linkTweet thisAlerts:
    @Master00authorMay 22.2005 — The client has minimum server space. They have a lot of documents and PDF's tend to take up a lot of space. It is not a public website, only a select few people will have the password to access the site. User satisfaction is irrelevant to this website.
    Copy linkTweet thisAlerts:
    @JPnycMay 22.2005 — If you set the text size to a specific pt. size with CSS, the webBrowser can't change it. As was already mention though, this is not advisable. It discriminates against the visually impaired.
    Copy linkTweet thisAlerts:
    @CharlesMay 22.2005 — If you set the text size to a specific pt. size with CSS, the webBrowser can't change it. [/QUOTE]Mine does so all the time. I have a lot of trouble reading small text and quite often enlarge the print. And I can set a minimum across all browsers.

    The solution to your server space requires a little learning on your part. Properly mark up all of the pages in XHTML or even raw XML. Then you'll need to learn XSLT and XSL-FO. XSLT will allow you to define a style sheet that describes how each page is to be transformed into HTML. XSLT-FO will allow you to transform each page into several formats including PDF. You'll have to set up the server to run each page through a processor but the processors are free and available at http://xml.apache.org/ .
    Copy linkTweet thisAlerts:
    @BonRougeMay 22.2005 — ?? I just tested this and changing the text size through the browser command does effect the way it prints on my computer.
    [/QUOTE]

    Sorry about that. I did test this notion before I posted and I was right - as far as I looked. I checked the print preview in Firefox when the text was huge and it looked normal. I forgot about IE - I often do. Goddamn piece of ....
    Copy linkTweet thisAlerts:
    @JPnycMay 22.2005 — Yes, in FF if you select "always use my fonts, colors" then it will change the font to whatever you wish. For IE to affect font size, the CSS relative values must be used.
    Copy linkTweet thisAlerts:
    @JPnycMay 22.2005 — I just found the setting in IE that allows this also. Ignore font sizes, in internet options>>general tab>>accessibility button. So no matter which major browser, if the user wishes, he can change the font, color, and the size.
    Copy linkTweet thisAlerts:
    @VladdyMay 22.2005 — If you provide a separate media="print" stylsheet with font size set in pt the changes to font size user makes on screen will not affect how the document is printed.
    Copy linkTweet thisAlerts:
    @felgallMay 22.2005 — The web page author defines the web page content using HTML and proposes how they think it should look using CSS.

    The visitor to the page chooses whether to use the author's CSS for the appearance of the page or alternatively can use their own CSS defined in their browser to override any layout specifications defined by the page author.
    Copy linkTweet thisAlerts:
    @JPnycMay 22.2005 — All true, but as it turns out, his concern wasn't the webpage appearance in the browser, but rather when printed. Vladdy answered his concern.
    ×

    Success!

    Help @Master00 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.5,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,

    tipper: @Samric24,
    tipped: article
    amount: 1000 SATS,
    )...