Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Increasing Font Size With A Button

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #32187
    zackw
    Member

    Hey guys, so I’m doing a website for a client that’s affiliated with the government so I need to pay special attention to W3C Accessibility Guidelines, one thing that the client has asked is for is a button on the webpage that will mimic pressing ctrl + in a browser to increase font size. Is this possible?

    #52980
    TheDoc
    Member

    Text resizers are everywhere. Check out the results:

    http://www.google.ca/search?sourceid=chrome&ie=UTF-8&q=jquery+text+resizer

    #52957
    Chris Coyier
    Keymaster

    What I’d probably do is use JavaScript, and class names on the html element. large-text-size, medium-text-size, etc. Then use those class names to set font sizes where you need to, as well as adjust whatever else you need to. Using class names at that hight of an element gives you lots of control.

    #52952

    @zackw – If you roll with the implementation that @chriscoyier suggested, you may also want to consider addressing other visual impairments, like color blindness, which can effect the perception of contrast.

    Veerle Pieters has implemented a ‘high contrast’ mode button on her site’s articles which switches to a high-contrast stylesheet. It changes the background to white, most text to black, and it also gives images a 1px black border.

    Her site is the only one that I’ve ever seen this implemented on, and I’ve always thought it was incredibly thoughtful (like most things Veerle designs).

    The button can be seen, and used, on this page – just below the title, but before the first paragraph;

    http://veerle.duoh.com/design/article/the_best_print_or_web_related_tip

    #52915
    zackw
    Member

    As always thanks for the replies, great knowledge and fast, color contrast was taken into account in the creative work but I still may apply your suggestion @aaronsilber. I will re-post once my Jquery guy takes care of the problem to let you know how it went and exactly what code we used, thanks

    #52918
    zackw
    Member

    hey guys so I didn’t properly word my question the first time, so let me try it again. It turns out we don’t just want to increase the font size but actually zoom in as if we were pressing “ctrl +”. The client feels that many people don’t know this shortcut so they want a button that does the same thing, is this possible?

    #52866
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.