Welcome to WebmasterWorld Guest from

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)

10+ Year Member

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?

Chris B.


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

WebmasterWorld Senior Member 10+ Year Member

have a look on google for 'stylesheet switcher'.

these could be

client based = 'javascript stylesheet switcher'


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


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

WebmasterWorld Senior Member 10+ Year Member

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.


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


Featured Threads

Hot Threads This Week

Hot Threads This Month