Click to See Complete Forum and Search --> : [RESOLVED] user-adjustable font size


Rattify
11-22-2006, 12:07 PM
Hi,

I want to be able to give my visually-impaired users the option of choosing a larger font size. I know that on csszengarden they have it so a user can choose a new stylesheet to be loaded onto the page by clicking a link. Or, alternatively, I could have the user click a link to load a new stylesheet onto the page that would cascade in with the existing page and just shift the font sizes up an em or two. I'm not sure which would be better, whether they are even both possible, or how I would make this happen. Any help would be appreciated.

Thank you!

Xeel
11-22-2006, 12:14 PM
option 1 (the most interactive way) - use javascript to alter css;
option 2 (static way) - give some style choosing posibility at the welcome page if there is one;
option 3 (IMHO the worst way) - reload the page submiting it with a parameter that will change the correspondant css file;

Fang
11-22-2006, 01:02 PM
Just define all font-sizes in relative units, then the user can decide the font-size - elastic layout.

felgall
11-22-2006, 01:11 PM
IE6 and earlier doesn't allow font sizes specified in fixed units such as pixels to be resized unless your visitor overrides your stylesheet with theirs.

For all other browsers all they need do is select the appropriate menu option in their browser to change the text size or define their own stylesheet to override font sizes so as to make all text on all web pages bigger without having to do anything for specific pages.

To make it easier for those who just want to be able to change the size quickly for specific pages simply specify your font sizes using either em or %.

Those who set up their own stylesheet will see all text at their chosen font size regardless of what you do for your page.

Rattify
11-22-2006, 08:17 PM
The font sizes are already all relative, but the problem is this: the vast majority of users have no idea how to change their browsing experience at all, much less make their own stylesheet. I want to have a little link on my page that says "click here to make fonts bigger" and have it make fonts bigger... I get a lot of old people and clueless people on my site and I've had more than one complaint about the font size, but my boss won't let me make it bigger. He says it looks "horsey" at bigger sizes. Problem is...I don't know javascript very well at ALL and I'm only just getting competent with CSS. (I am just an intern.) I know theoretically how it might be done but can't find the actual code in my books anywhere. Can someone point me to a page where I can see the exact syntax?

Fang
11-23-2006, 01:12 AM
http://www.alistapart.com/stories/alternate/

Rattify
11-23-2006, 09:55 AM
AHA! Thank you :)