SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member mr.chips's Avatar
    Join Date
    Sep 2006
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow How do I stop someone from resizing the web text

    Im using dreamweaver and I am wondering if there is a way or some sort of code I can stop the user from resizing text with the cntrl + mouse wheel ?
    Ive got CSS style sheets attached to my site but dont know what to do next?
    Any help would be much aprieciated.
    thanks - Lucy

  2. #2
    I see geek people adris72's Avatar
    Join Date
    Feb 2005
    Location
    NYC
    Posts
    227
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why would you like to stop them from resizing the text? When I build my websites I make sure that they CAN do that. It's an usability rule. Did you ever though that if they want to resize the text is because they can't read it (maybe they have sigh problems). By not allow them to resize the texts, you are telling them that you don't care, so they can go and look for another website.

    Now, to answer your specific question, all you have to do is to put the font sizes in pixels instead of percent or ems. But, this will only work in Internet Explorer. People using Firefox, Mozilla, etc. will still be able to do it... thanks God.


  3. #3
    SitePoint Member mr.chips's Avatar
    Join Date
    Sep 2006
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! exactly what I needed to know

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    You need to define all of the text sizes in pixels and force all your visitors to use antiquated browsers that don't allow them to resize text defined in pixels. You also need to modify their computers to stop them from being able to install their own stylesheet to override yours. Unless you are setting up pages for an intranet where you can specify the browser used and set file permissions on all of the computers then there is no way to stop your visitors resizing your text if they want to.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  5. #5
    SitePoint Guru
    Join Date
    Jun 2006
    Posts
    638
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    2 ways i can think of:
    - Make your text in an image. (they can't select it)
    - Make your text in a flash file. (they can select it)

  6. #6
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,156
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    text resizing

    Hi mr.chips, welcome to the forums,
    Why not allow text resizing? The only thing I can think of is that you've noticed that resizing text "breaks" your design. Perhaps the text "over-laps" another area, or "blocks" of content shift on the page. If this is the case, the solution is NOT to attempt to prevent text resizing (impossible anyway) which would break the site's accessability, but to fix your CSS.

  7. #7
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mr.chips
    Thanks! exactly what I needed to know
    Actually, it's not.

    What you need to know is how to make accessible web pages that will allow the users to choose whatever font size they need (or like). Good places to start are the HTML and XHTML forum, the CSS forum and the Accessibility and Usability forum right here at SitePoint.
    Birnam wood is come to Dunsinane

  8. #8
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Making it an image of flash makes it completely inaccessible to a large portion of your potential visitors.

    If your goal is to make the page inaccessible to as many people as possible then the best solution is to not upload it to the web.

    If you want it to be accessible to as many visitors as possible then your text needs to be text and not images or flash and it needs to be resizable so that people with poo eyesight can see it.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •