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

Content Positioning

In the previous section, you saw how you could use JavaScript to assign values to style characteristics and dynamically format your document. One class of style characteristics was deliberately left out of the section, however: those for specifying content position. Content positioning is a much different activity than assigning styles, and you can bring many more JavaScript commands to bear on a content-positioning challenge. This section looks at how you can do content positioning with Netscape Navigator 4, using both the nonstandard <layer> element as well as CSS techniques.

The <layer> and <ilayer> Elements

Chapter 24 showed you some examples of content positioning. Specifically, you saw how you could position an element with respect to the upper-left corner of the browser window (absolute positioning) or with respect to the location where the element would ordinarily be placed (relative positioning). In addition to being able to specify the x and y coordinates of where the element should appear, you were also able to control a z coordinate, which determined how the elements overlap. You could think of each element as sitting on a transparent sheet that you can move around the browser screen and stack one on top of the other to create different effects. Netscape's term for these transparent sheets is layers. You can implement layers in Navigator by using the CSS specification for content positioning or by using the proprietary <layer> and <ilayer> elements to do absolute and relative positioning, respectively. This section introduces you to the <layer> and <ilayer> elements and their many attributes.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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