Hi,
I have a web page that calls an external stylesheet.
When the user clicks the increase or decrease or increase font button, I would like the font size of my PageHeading class to increase or decreasing accordingly.
How do I reference my PageHeading class defined in my external stylesheet
in the code?
Here is my PageHeading class inside my stylesheet...
This code references the entire web page, but I only want the PageHeading class to increase.
.PageHeading
{
color : "#003399";
font-family : Arial, Helvetica, sans-serif;
font-size : 16px;
font-weight : bolder;
font-style : normal;
}
Here is the javascript code.
function resizeText(multiplier)
{
if (document.body.style.fontSize == "")
{
document.body.style.fontSize = "1.0em";
}
document.body.style.fontSize = parseFloat(document.body.style.fontSize) + (multiplier * 0.2) + "em";
}
Any help would be appreciated.



Reply With Quote

Bookmarks