By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,672 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Enlarge text with a javascript link..how??

P: n/a
Hi,

I need to add a text or image link which when click on will enlarge
the text on a web page to ither large or largest.

How can I do this, if its possible.

Chris
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
lo*****@yahoo.co.uk (chris) writes:
I need to add a text or image link which when click on will enlarge
the text on a web page to ither large or largest.


<input type="button" onclick="document.body.style.fontSize = '120%'"
value="Larger">
<input type="button" onclick="document.body.style.fontSize = '144%'"
value="Largest">

Remeber to only use relative sizing on the font sizes you set
yourself, then a larger font size for the body element will be
inherited for the entire page.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.