Forum

Log In Sponsors
Partner Sites
Board index Programming CSS Forum

Resize Text

Resize Text

Postby HardRockCharlie on Tue Dec 21, 2004 4: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 7:10 am

Postby Malcolm on Tue Dec 21, 2004 4: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 10:53 pm
Location: Ontario, Canada


Return to CSS Forum

Who is online

Users browsing this forum: No registered users and 0 guests