Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

How to adjust font size?

0.00/5 (No votes)
3 May 2009 1  
In this post you will see how can we change the font size on the fly. Style.css.bodyContent14{FONT-SIZE: 13px; LINE-HEIGHT: 14px}

This articles was originally at wiki.asp.net but has now been given a new home on CodeProject. Editing rights for this article has been set at Bronze or above, so please go in and edit and update this article to keep it fresh and relevant.

In this post you will see how can we change the font size on the fly.

Style.css

.bodyContent14
{
FONT-SIZE: 13px; LINE-HEIGHT: 14px
}

.bodyContent16
{
FONT-SIZE: 15px; LINE-HEIGHT: 16px
}

Page.aspx

function doZoom(size)

{

   var o = document.getElementById(”bodyContent”).className = ”bodyContent” + size;

}

The text inside the Div will change and  adjust Font size 16 to 14.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here