O'Reilly logo

Essential JavaScript™ for Web Professionals, Second Edition by Dan Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Project I: Browser Detection and Cloaking—Dynamically Generating Platform-Specific Content

Even though you may not have had much experience with CSS/DHTML, because there is only one font style specified on the homepage, it's pretty easy to figure out how to change the size of the problem text. We simply change the point size of the font attribute.

<style type="text/css">
     .homePageText {
     color : #000000;
     font : 9pt Arial, Helvetica;
     font-weight : normal;
     }
</style>

Unlike traditional HTML, where you change the font size by either adding or subtracting from a default size, with CSS/DHTML you can specify a point size for a font much as you would within a document editor such as Microsoft Word. Currently, the font is set to 9pt. After playing around ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required