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.
Revision number 2, Sunday, May 03, 2009 5:20:07 PM by victorgirotto
You must Login to comment.
|
Sun, May 3, 2009 3:20 AM
by victorgirotto
|
Great article! I´ve been wondering how to do that! Thanks!
|
|
Tue, May 5, 2009 9:19 PM
by isidrocaM
|
could be more specific on how to use the code is very difficult for beginners, thanks
|
|
Wed, May 6, 2009 9:50 AM
by idgetman05
|
Try including some more details on what it is doing when you call that function and taht it needs the css class for each fontsize or it needs to include validation so a user or developer does not exceed the limit of the font size
|
|
Thu, May 7, 2009 9:37 AM
by skh21
|
please describe a bit more clearly
|
|
Tue, May 12, 2009 1:06 AM
by ahmish
|
Currently, it will adjust two font size only, it should be Generic.
|
|
Mon, Jun 15, 2009 7:07 AM
by asim afzal
|
Adjust Font size User this href="doZoom(16)" in the hyper link.
|
|
Mon, Aug 9, 2010 2:23 AM
by mkscor
|
Please explain how to use it . u know a bit more descriptive..
|