Results 1 to 7 of 7

Thread: One click to make text size bigger for readers

  1. #1
    Registered
    Join Date
    Sep 2003
    Posts
    110

    Arrow One click to make text size bigger for readers

    I saw this feature on one website.

    Website viewers can choose their preferance on font size (small, normal, large, extra large) by clicking on a button.
    If you click on the image, all the texts on that page gets smaller, larger, and etc. and it does it instantaneously. Meaning, it does not direct you to another page with a different font size but rather it is the same page and all the text size changes size.


    Do you happen to know how to accomplish this? One of my site has small font texts and I sometimes have a bit problem reading it myself. I like to give the viewers their choice on font size.

  2. #2
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,049
    If its instantaneous like that its probably JS powered, so you could just view the source to see how.
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  3. #3
    Senior Member chromate's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    2,348
    Yep, javascript / DHTML. IKwak, try this page, http://www.dansteinman.com/dynduo/en...ingstyles.html (scroll right down)

    That Dynamic Duo site is really handy for things like this.

  4. #4
    Registered intelliot's Avatar
    Join Date
    Jul 2004
    Posts
    309
    Wired.com does it with a combo of Javascript and CSS.

    Code:
    // ----------------------------------------------
    // StyleSwitcher functions written by Paul Sowden
    // http://www.idontsmoke.co.uk/ss/
    // - - - - - - - - - - - - - - - - - - - - - - -
    // For the details, visit ALA:
    // http://www.alistapart.com/stories/alternate/
    //
    // nifty StyleSwitcher scripts modified by Aaron Jones 10/10/2002
    // ----------------------------------------------
    
    function setActiveStyleSheet(title, reset) {
      var i, a, main;
      for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
        if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
          a.disabled = true;
          if(a.getAttribute("title") == title) a.disabled = false;
        }
      }
      if (reset == 1) {
    	  createCookie("wstyle", title, 365);
      }
    }
    Elliot Lee
    Google Forums - Community for Google Fans!

  5. #5
    Registered User davesplace1's Avatar
    Join Date
    Oct 2003
    Location
    Seaside, Oregon
    Posts
    192
    Larger text is a good thing for us "middle aged" surfers . I had not seen this on a site yet, but it sure sounds like a good thing to me. I will have to test it on one of my sites.

  6. #6
    Registered
    Join Date
    Sep 2003
    Posts
    110
    I appreciate all for the responses.

  7. #7
    Registered Xander's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    263
    I've seen quite a few sites specifiying alternative css, which shows up as an option in mozilla. E.g. Vinne Garcia's old site http://old.vinniegarcia.com/ - option shows in Mozilla but IE needs javascript I think.

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
  •