While you control the position of a <layer> using top and left attribute coordinates relative to the document’s entire display space, Netscape provides a separate tag–<ilayer>–that lets you position individual layers with respect to the current flow of content, much like an inline image.
An <ilayer> tag creates a layer that occupies space in the containing text flow. Subsequent content is placed after the space occupied by the <ilayer>. This is in contrast to the <layer> tag, which creates a layer above the containing text flow, allowing subsequent content to be placed under the layer just created.
The <ilayer> tag removes the need for an enclosing, attribute-free <layer> that serves to put a nest of specially positioned layers inline with the content flow, much like we did in most of the examples in the previous sections of this chapter. The attributes of the <ilayer> are the same as those for the <layer> tag.
The top and left attributes
The only attributes that distinguish the actions of the <ilayer> tag from its <layer> sibling are the top and left attributes: Netscape renders <ilayer> content directly in the containing text flow, offset by the top and left attribute values from the upper-left corner of that inline position–not the document’s upper-left display corner, as with <layer>. Netscape will also accept negative values for the top and left attributes of the <ilayer> tag, letting you shift the contents above and to the left of the current flow.
For example, to subscript, superscript, or shift words within the current line, you could use:
This <ilayer top=4>word</ilayer> is shifted down, while this <ilayer left=10>one</ilayer> is shifted over. With a negative value, words can be moved <ilayer top=-4>up</ilayer> and to the <ilayer left=-10>left</ilayer>.
The resulting effects are shown in Figure 6.11. Notice how the shifted words overlap and obscure the surrounding text. Netscape makes no effort to make room for the shifted elements; they are simply placed in a different spot on the page.
Combining <layer> and <ilayer>
Anything you can create with a regular layer can be used within an inline layer. However, do bear in mind always that the top and left attribute offsets are indeed from the <ilayer> content’s allotted position, not from the document display space. Accordingly, use <ilayer> to position content inline with the conventional HTML document flow, and <layer> to position elements and content precisely in the document display space.
Also (and fortunately), Netscape does not distinguish between <ilayer> and <layer> tags when it comes to order of appearance. You may declare that an <ilayer> appear below some <layer> by using the name and above attributes:
<layer name=me>I'm on top</layer>
While you control the position of a <layer> using top and left attribute coordinates relative to the document’s entire display space, Netscape provides a separate tag–<ilayer>–that lets you position individual layers with respect to the current flow of content, much like an inline image.
An <ilayer> tag creates a layer that occupies space in the containing text flow. Subsequent content is placed after the space occupied by the <ilayer>. This is in contrast to the <layer> tag, which creates a layer above the containing text flow, allowing subsequent content to be placed under the layer just created.
The <ilayer> tag removes the need for an enclosing, attribute-free <layer> that serves to put a nest of specially positioned layers inline with the content flow, much like we did in most of the examples in the previous sections of this chapter. The attributes of the <ilayer> are the same as those for the <layer> tag.
The top and left attributes
The only attributes that distinguish the actions of the <ilayer> tag from its <layer> sibling are the top and left attributes: Netscape renders <ilayer> content directly in the containing text flow, offset by the top and left attribute values from the upper-left corner of that inline position–not the document’s upper-left display corner, as with <layer>. Netscape will also accept negative values for the top and left attributes of the <ilayer> tag, letting you shift the contents above and to the left of the current flow.
For example, to subscript, superscript, or shift words within the current line, you could use:
This <ilayer top=4>word</ilayer> is shifted down, while this <ilayer left=10>one</ilayer> is shifted over. With a negative value, words can be moved <ilayer top=-4>up</ilayer> and to the <ilayer left=-10>left</ilayer>.
The resulting effects are shown in Figure 6.11. Notice how the shifted words overlap and obscure the surrounding text. Netscape makes no effort to make room for the shifted elements; they are simply placed in a different spot on the page.
Combining <layer> and <ilayer>
Anything you can create with a regular layer can be used within an inline layer. However, do bear in mind always that the top and left attribute offsets are indeed from the <ilayer> content’s allotted position, not from the document display space. Accordingly, use <ilayer> to position content inline with the conventional HTML document flow, and <layer> to position elements and content precisely in the document display space.
Also (and fortunately), Netscape does not distinguish between <ilayer> and <layer> tags when it comes to order of appearance. You may declare that an <ilayer> appear below some <layer> by using the name and above attributes:
<layer name=me>I'm on top</layer> <ilayer above=me>I'm on the bottom</ilayer>
Similarly, you may reorder the appearance of both absolute and inline layers where they overlap by assigning z-index attribute values to the various elements. Nesting rules apply, as well.
<ilayer above=me>I'm on the bottom</ilayer>
Similarly, you may reorder the appearance of both absolute and inline layers where they overlap by assigning z-index attribute values to the various elements. Nesting rules apply, as well.













![Ilayer Tag Html [Graphic: Figure 6-11]](../../images/html/figs/h2_0611.gif)

































