Font Resize Using Javascript

How to Use Font Re-size

Part 1 – Setup

Font Re-size include one Javascript file in your header in this order.

<script type="text/javascript" src="common/js/functions.js"> </script>

Include the Font Re-size CSS file or append your active style sheet with the Font Re-size styles.

<link href="common/css/layout.css" 	rel="stylesheet"  type="text/css" />

Part 2 – Activate
To activate Font Re-size we need to follow these steps.

<li><a href="#" onclick="changeFontSize(-2)">-</a></li>
<li><a href="#" onclick="revertStyles_small()">A</a></li>
<li><a href="#" onclick="revertStyles()">A</a></li>
<li><a href="#" onclick="revertStyles_larg()">A</a></li>
<li><a href="#" onclick="changeFontSize(2)">+</a>
</li> </ul> </div> </div>

Most impotently here we call a js function which sets the size of fonts according to our requirement,i.e onclick=”changeFontSize(-2)” and onclick=”changeFontSize(2)”. We use this two parameters -2 and +2 in js to maximize or minimize the font size.