The more popular HTML has become, the more page designers accustomed to a finer level of control over the appearance and location of each element have chafed at the limitations imposed by the language. The World Wide Web Consortium's (W3C) solution was to develop a specification for a new addition to HTML called style sheets. Over the last year both Netscape and Microsoft have adopted W3C consortium's standard (more or less), paving the way for web pages that can be laid out as precisely as magazinesand other printed materials. For those with programming experience, style sheets allow HTML elements to be placed with the same precision as elements on Visual Basic forms – an improvement, but they still don't offer the fine level of detail that might be required.
With the introduction of Dynamic HTML, the functionality of style sheets has been extended allowing developers to gain increased control over the positioning of elements, via the provision of x and y type coordinates which are calculated in pixels. Also, it is now possible to alter properties of elements on a page dynamically, and for the positions to be altered without a page refresh. Indeed style sheets now form a main method for connecting your scripts to the elements on the page. However, we won't be covering style sheets and scripting until Chapter 5. Although many of the more advanced Dynamic HTML effects require this, such as element movement, this chapter provides a quick overview on style sheets and demonstrates how useful style sheets can be on their own.
In this chapter we'll be talking about:
style
object.