PDA

View Full Version : Changing Font-Size


regagnon
11-09-2006, 06:57 PM
:confused: Hi All
More and more we see on web pages the option of choosing the font size.

I would like to offer the same option on my page, but I can get started.

I know that CSS and Javascripting are working together, I just not able to change the font-size property of the CSS.

HELP!!

Thanks

Cheers

Ren

ess
11-09-2006, 08:10 PM
Hi regagnon,

In css, you can specify the font size like so
<style type="text/css">
body
{
font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
font-size: 10pt;
}
</style>

to change a given element's style in javascript, for example the body of a page..you can do this.

<script type="text/javascript">
window.document.body.fontSize = "20px";
</script>

good luck
:thumbsup:

regagnon
11-09-2006, 08:26 PM
:D :D :D Thanks
This is great

cheers

Ren