Positioning with Cascading Style Sheets
Extending CSS to support the positioning of HTML elements
By Chuck White
When the World Wide Consortium (W3C) introduced Cascading Style Sheets (CSS1), Web designers were reluctant to incorporate them into their sites. One sore point has been that while CSS1 allows some control over positioning of HTML elements through the use of Box Properties, it doesn't provide the level of control designers want.
Fortunately, W3C has introduced CSS Positioning, an extension to CSS1 that allows you to position elements more precisely and keep better track of multiple layers. Positioning utilizes the same x, y coordinate system used in graphics programs like QuarkXPress, PageMaker, Corel Draw, and Photoshop. And while browser support for CSS has been spotty, CSS positioning actually enjoys a much more consistent level of support in Navigator 4.0 and Internet Explorer 4.0 than CSS1. So get out your text editor and a browser that's got a "4" in it, and let's see how it all works.
The ID Attribute
The ID attribute, new to HTML 4.0, assigns a name identifier to an HTML element. The name carries throughout a document, so it must be unique. Once assigned, the name can be referenced by scripts, style-sheet rules, anchors, and so on. For example, <H1 ID=differentStyle>This is it!</H1> associates differentStyle with a particular line of text.
Although the syntax involved is case-insensitive, you must use the same case selection as the rule you are accessing.