Adjusting the font size throught DHTML

They have: 318 posts

Joined: Mar 1999

Hello,

My site uses dhtml to make the font a specific size. If a user would use the Internet Explorer menu to increase or decrese the size (View > Text Size > Largest), the font size wouldn't change at all. In a portion of a site, the font size will be much smaller (still using dhtml there) and I want users to have the option to increase or decrease the text size automatically at their own will - for that portion. Here's what I would like: a link users click like this:

Increase Text
Decrease Text

Clicking one of the options would increase/decrease the text in the coding:

this text will be altered

Does anyone know how to do this effect?

Thank you, Sabrina

They have: 231 posts

Joined: Feb 2000

There is a way to add a CSS rule dynamically with IE. This would allow you to change the font-size property for the DIV. But I do not know how to do it. I will hunt around for the code.

Another way you could do this is by re-writing the entire contents of the DIV with new font settings. But this is probably not a realistic option.

:: Lloyd Hassell :: http://www14.brinkster.com/lloydh ::

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.