It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

Resize Text

Resize Text

Postby HardRockCharlie on Tue Dec 21, 2004 3:11 pm

How can I use a link on a webpage to increase the size of the text. This would be used by users with vision problems. I want to use a css my existing css file or link to a new css file. When they close the web site it will revert back to the original.
HardRockCharlie
 
Posts: 0
Joined: Tue Dec 14, 2004 6:10 am

Postby Malcolm on Tue Dec 21, 2004 3:46 pm

on 99% of the browsers you can either
ctrl + mouse scroll up or down
or
ctrl + + /ctrl + -

If you want a more... designer controled solution try something like:
Code: Select all
<html>
<head>
<style type="text/css">
   #container { font-size: 12px; }
   #layers { font-size: 240%; }
</style>
</head>
<body>
<div id="container">
   I'm 12px
   <div id="layers">
     I'm a %'age of the containers px value!<br />
     <a href="#" onclick="document.getElementById('container').style.fontSize='18px';return false;">Click me to make this
     bigger!</a><br />
     <a href="#" onclick="document.getElementById('container').style.fontSize='5px';return false;">Click me to make this
     smaller!</a>
   </div>
</div>
</body>
</html>


Tested and works in Firefox and IE
User avatar
Malcolm
100+ Club
 
Posts: 198
Joined: Thu Oct 07, 2004 9:53 pm
Location: Ontario, Canada


Who is online

Users browsing this forum: No registered users and 0 guests