Trevor:
See my answer to Cheese_whiz, and you may also want to look here -
http://www.great-web-sights.com/g_layersdemo.asp
Layers are simple once you understand this part.
There are 4 kinds of CSS positioning (we have to move away from the FP sense
of 'layers' here) -
absolute, relative, static, and fixed.
Static positioning is the default - this means that any old container tag
(paragraph, table, div, to name three of the common ones) is positioned on
the screen entirely based on its location in the flow of the code from
<body> to </body>. Such containers occupy space on the page, and will
therefore push other things around as they flex in dimensions, as you have
already experienced with divs and tables.
Fixed positioning is (or should be) what you might think of as a
'watermark'. It's a position relative to the *browser* viewport, not the
page. This means that when a container is position:fixed, it will stay
placed in the browser viewport, even as the page contents scroll beneath (or
above) it. If this style were uniformly supported, then frames could go
away forever, but it's not. Such containers behave in all respects like
absolute positioned containers, except that the frame of position reference
is the browser viewport.
Absolute positioning is positioning using the ancestor container's reference
coordinates. In addition such elements DO NOT occupy space on the page, and
therefore cannot interact in any way with other page elements. This is why
it's such a terrible idea to build a page using only layers. When the
browser's text size is increased, the layers contents expand, and will
overlap other layers without pushing them away. You get a terrible
overlapping mess. Absolute positioned elements simply float above the page,
and once placed, cannot move with respect to the PAGE. This means that if
you have absolutely positioned elements on a page which also contains
centering or flexing content, as you change the browser's viewport
dimensions, you will see page elements shift with respect to the absolutely
positioned elements, which are stuck like glue.
Relative positioning is positioning relative to where that element would
have been placed if it had not been positioned. This is the MOST confusing
thing about the four types of positioning. These elements are placed IN THE
FLOW OF THE CODE. Any offsets (e.g., position:relative; top:20px;
left:150px
would be calculated from the place the container would have
been placed if it had been a static element. This concept is shown nicely
on the page I link at the top of this post. Such elements DO take up space
on the page, and they DO therefore interact with other page elements. This
means that as their dimensions change, so will the position of adjacent
static elements.
Does that help?