Welcome to WebmasterWorld Guest from 54.160.254.203

Forum Moderators: ergophobe

Message Too Old, No Replies

Allowing users to change the font size

The simlest way to perform a one click operation?

     
7:12 am on Jul 13, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:June 21, 2005
posts:126
votes: 0


The standard font size on my website is 11px. I have seen a number of websites recently with a number of different sized characters at the top of the screen which the user can click to change the font size.

I think this is a great idea as a lot of web users don't know how to change the text size in browsers.

What is the simplest way to do this if I use CSS for my page layout?

Regards.
Chris B.

7:56 am on July 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 14, 2003
posts:1550
votes: 0


have a look on google for 'stylesheet switcher'.

these could be

client based = 'javascript stylesheet switcher'

or

server baser = 'php/asp/.net/jsp/cfm (circle the one you want) stylesheet switcher'

7:57 am on July 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 13, 2003
posts:1240
votes: 0


My preffered method is to set a cookie and reload the page.

Every page load checks for the cookie and if nessecary adds a reference to another stylesheet.

If you just want to change the font size you could add style="font-size:150%;" or similar to the <body>.

Loading a completely seperate stylehseet allows you to do much more than increase the font-size.

i use php for this.

Ben

[added] ^^ what le_gber said ^^ [/added]