PDA

View Full Version : Increase Text Size Style


willsmith727
2nd June 06, 10:57 AM
Hey everyone, im new to this forum. Ive been using CSS simply for a while and i reckon ive got an average + grasp of it.

At the moment i have a client wanting a site whereby the user can click a neat little tab and increase the text size and then click it again to decrease it. This is basically because the target audience are most likely going to be hard of sight. Ive seen this done quite a bit by other CSS gurus, but im a little confused on how to do it.

Do i need to create a totally different style sheet with the text size increased, and then switch to this stylesheet when the user clicks the tab?

If someone could talk me through it in steps i would be most grateful. Thanks :D.

funkyprem
2nd June 06, 12:10 PM
I've used this as is http://www.alistapart.com/stories/alternate/ on a site very effectively.

First step, create your base style sheet that will be your main one.

Then, create a seperate style sheet that contains your amended styles only. For example, you may just have one line in the second SS that has a larger base size on your body tag and this would then cascade down to all other elements on your page.

willsmith727
2nd June 06, 01:07 PM
Thanks m8 thats helped a little.

In that Javascript file provided with the article, do i need to go through it and change 'title' etc to the title of my new stylesheet?

funkyprem
2nd June 06, 01:32 PM
everything you need to make it work is freely available for download there.

if I remember correctly all I had to change was the references to the alternate stylesheet.

this is where I implemented it myself. www.smwweb.co.uk feel free to look at/steal the code :)

willsmith727
2nd June 06, 01:56 PM
Get in! Done it :D. Ty for the help m8. Feels so good when you crack it lol.

funkyprem
2nd June 06, 02:04 PM
I love it when a plan comes together! (http://www.geocities.com/matt_nyc/ateam/Images/Hannibal/hannibal-hat.jpg)

willsmith727
2nd June 06, 02:07 PM
lol, im more of a designer than a coder so it feels twice as good when i crack something like this :P

funkyprem
2nd June 06, 02:51 PM
what a designer too!

your site is sweet dude! :)

As you probably saw, i'm more of a coder than a designer! Like to get creative with CSS though.

willsmith727
3rd June 06, 10:37 AM
The Giant Peach one? Thanks, thats the company im part of and i designed our site :D.