Hunting The Layer
15 April 2004
Types of Layer
What is a layer? Well, that depends who you ask, its one of those terms which has become so abused that using it is simply confusing.
- The CSS Layer and The Traditional Layer
-
Traditionally "layers" has referred to things that have different positions in the stack order. Often they are positioned so one is (at least partially) on top of, or underneath, the other(s).
In CSS layers are always positioned, but positioned elements are not always (or even usually) layers.
The relevent documentation is section 9.9 of the CSS 2 specification. You might also find Tina Holmboe's more detailed explanation of layers useful.
- The Netscape Layer
-
In the long and distant past, Netscape 4.x[1] was released. This was before Netscape saw the light and began to make proper use of public standards and they introduced
<layer>
. In Netscape a layer was effectively a<div>
which could be influenced in JavaScript in ways that normal divs couldn't. - The Macromedia Layer
-
Macromedia[2] produce an overpriced piece of software called Dreamweaver, it calls any positioned element "a layer", even if it doesn't overlap anything.
As the term 'layer' has so many meanings, its best avoided altogether. For clarity, its probably a good idea to refer to "Elements positioned so they overlap", "Netscape 4 Layers", and "Positioned elements".
Footnotes
1. I don't like Netscape 4.x. It was a bug ridden nightmare (and its unfortunate that some people are still clinging on to it).
2. I don't like Macromedia. Dreamweaver adds to the low quality HTML on the net, and the company encourages people to use Flash (which is quite a good product) for things which it isn't really suited to (like replacing HTML).