Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing text size

Status
Not open for further replies.

birney29

Programmer
Oct 11, 2001
140
GB
I am trying to change all the text on the page to a bigger size when the user clicks a button. any ideas how to do this?

Thanks

Kenny
 
well, here is one way of doing it:
<html>
<head>
<style>
#body {font-size:16pt;}
</style>
</head>
<body id=body>
<button onclick=&quot;document.all.body.style.fontSize='22pt';&quot;>make text bigger</button>

</body>
</html> Robert Carpenter
questions? comments? thanks? email me!
eclipse_web@hotmail.com
Icq: 124408594
online.dll

AIM & MSN: robacarp
 
Also if you wanted to scale the side one larger you could always use the larger keyword in css.

Also if you have another set font size you want to use you could have two stylesheets and replace the stylesheet using some javascript/dom.

Both these methods probably won't be to friendly to older browsers though. ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top