changing font sizes by buttons

Discussion in 'CSS' started by maksinx, Jan 14, 2009.

  1. #1
    hello everyone,

    Can anyone tell me how to create css or if there is any alternative ways to change the font sizes on a webpage by simply pressing a button,
    the following page is an example.

    //packages.sky.com/
    ( the buttons for changing text size)

    any suggestions welcome.

    Thanks in advance
    maksin
     
    maksinx, Jan 14, 2009 IP
  2. crath

    crath Well-Known Member

    Messages:
    661
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    100
    #2
    every piece of text on the page? or just certain id's or class's of text?

    You would use javascript by the way.
     
    crath, Jan 14, 2009 IP
  3. maksinx

    maksinx Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    if i want to change every text on the page, how i can do it?
    And how it is done with javascript are there any tutorials or samples that i can check .

    pls advice
     
    maksinx, Jan 15, 2009 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    First of all, be aware that adding on an extra pile of scripts for font resizing (which browsers already do themselves) can be working backwards.

    If your target audience is the ignorant (people new to the internet, browsers, how to get around-- meaning, seniors and kids mostly) then what you want is called a resizing widget. Just don't make the mistake of making the button itself too small.

    You may want to read this, not only the article (which links to some widgets I think) but also the comments.
    http://accessites.org/site/2008/08/wrangling-widgets/

    This argument here: "Text resize options are often buried in deep within the browser’s interface and are not readily available by default."
    has a strange answer. Buried? Assuming you can't just ALT+ or CTRL++ (easy enough to do if you have two working hands, yes I realise not everyone does but more folks do), there's always
    View>Text-size or Zoom>pick one from there, in the most popular browsers.
    I wouldn't call that buried, but it's also not known by everyone, esp not new people.
     
    Stomme poes, Jan 15, 2009 IP
  5. ads2help

    ads2help Peon

    Messages:
    2,142
    Likes Received:
    67
    Best Answers:
    1
    Trophy Points:
    0
    #5
    Not using css but javascript can do it
     
    ads2help, Jan 17, 2009 IP