• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Dynamic Styles

Styles have become more important as time has gone on (we’ll cover working with styles in Chapter 21, “Cascading Style Sheets and CGI Programming”), now even replacing the beloved HTML <CENTER> element (according to W3C, you’re supposed to center elements with styles starting with HTML 4), and, in many ways, the Netscape <LAYER> element we’ll see later in this chapter.

Using the style property, you can change the appearance of a page at runtime in browsers such as IE4+ and NS6+; you also can position elements on-the-fly. Here’s an example showing how to create text mouse rollovers (also see graphic mouse rollovers in Chapter 15, “Working with the Mouse, Keyboard, and Images”). In this case, the code makes some text bigger when the mouse rolls over it:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint