Log in

View Full Version : changing text size



jw11
08-30-2006, 07:11 PM
I have written my css in px.

I want to add an option for my visitors to increase the text size - the site is mainly for senior citizens. What's the best way? Is there a javascript to use? Will I completely mess up my formatting?

I have a pretty large site - over 1000 pages and am a little nervous about messing up the formatting...

Thanks!
jw11
:eek:

blm126
08-30-2006, 07:45 PM
Never use pixels. If you use percentages(or em) the user can use built in browser functions to increase the size. Yes this may completely destroy your layout, but your layout should be rebuilt to accommodate it.

codeexploiter
08-31-2006, 10:35 AM
Hi JW11

I think you can use the concept used here to solve your situation

http://css.somepeople.net/dynamic

http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm

jw11
08-31-2006, 01:07 PM
Many thanks.
I'll give your suggestions a try, maybe I can leave the current css page the same and create new ones for the larger text.

I have had trouble using em's and %'s. I found as the browser resized, they moved but the wrapper I used did not which messed up the overall look of the pages.

mburt
08-31-2006, 02:33 PM
Tell them to hold Ctrl and scroll with the scrolling thingy on their mouse :p

mwinter
08-31-2006, 04:20 PM
Tell them to hold Ctrl and scroll with the scrolling thingy on their mouse

That's all well and good, but if the OP has used pixels to define font sizes, that won't work in MSIE. The pt and px units cause IE to fix the font size, preventing the built-in text sizing controls from working (this doesn't affect other browsers, but technically the behaviour in IE is correct).

If the site is aimed at older people, many of whom are almost guaranteed to have poorer eyesight, then it is essential that usability features like text resizing works.


By the way, Mike, you're referring to the mouse wheel. ;)

Mike