Jim said:
Did I miss something in my HTML fundamentals? Is there another
definition for layer?
Murray wrote a great definition of layers not long ago.
Here is his post in full:
==============================
Here's a post I have repeated (and updated) more than once here about layers
and tables -
you may find it helpful -
If you need to use layers, then use them. If you want to begin using
CSS-P
methods, then use them by all means! But learn how to use them first
http://www.thepattysite.com/layer_laws.cfm
The word "layer" was first coined by Netscape when it introduced its
heinous
and ill-fated <layer> tag with NN4x. It has since been adopted by th
community to generally refer to absolutely positioned <div> tags, and
Dreamweaver has
propagated that usage. In fact, there is really no such HTML thing a
layer, but for the purposes of this discussion let's use the
Dreamweaver/FP
sense of applying that term to absolutely positioned <div>s.
==============================
In plain talk, a layer is like a magic carpet - it floats above your
content (any page content, including tables, images, text, etc.). It
unaffected by page margin settings because it is not really on the pa
You can whisk it around on the page to provide motion (using timeline
You can make it visible or invisible using any of the actions appropr
to
your browser selection (like onMouseOver, onClick, onLoad, etc.). Yo
dynamically clip or scroll the contents of layers to provide a window
effect within a page. Layers are wondrous constructs that let you br
your pages to life! Get to know them - they are your friends....
=================
I would add in clarification and elaboration that layers are position
elements and as such allow you to put content at any location you des
regardless of the remainder of the content on the page.
The downside to layers is the flip-side of their real benefit. Becau
they
are absolutely positioned, they will be static page elements, i.e., t
will not move to reflect changes in your browser viewport size unless
you
apply some custom javascript to the page that makes the layers move,
unless you use
specific CSS-P techniques to make them move. There
is no native support in HTML for moving layers - that's why it must b
done
with custom js or advanced CSS.
If you consider that a 'layer' is really just a 'division' or <div> t
the page, and that you can use
CSS to position this <div> tag, as well as control the format of its
contents and how it interacts with
other content around it, then you can see how valuable it might be fo
as a page layout tool!
This impression is certainly true. As you become more familiar with
you will learn how to
replace a large part of your current page layout methodology with pur
positioned page
elements. But it's something you should take your time with. It is t
way of the future, so at
some point we will all have to come to grips with using CSS in this
manner.
Some people use layers exclusively for page layout because of the eas
with
which they can be positioned. I do not recommend this approach for a
that is new to layers or to CSS in general because it can be confusin
troublesome. This is partucularly the case if you will have multiple
layers, each
containing nominally uncontrolled/unstyled text. Viewers resizing th
text in their
browsers will see a disappointing overlap of paragraphs that is surel
what you desire.
Tables, on the other hand, are most everything that layers are not!
are flexible page elements, in that native HTML can center, or right
left
align a table - in other words, they can float around on your page
depending
on the browser's viewport width. Although originally added to HTML a
means of displaying tabular data only, tables quickly became the
principal
structural element used in page layout. They can be made rigid in or
to
provide a stable base for your page elements, including text, images,
Flash,
etc. They are easy to use and to learn (more or less), and behave in
(mostly) predictable ways across browser and platform combinations -
there are quirks that must be learned to use them successfully. Luck
most of these quirks are discussed here daily. In spite of these qui
however, if you intend
to be a credible web developer, you must learn how to build stable ta
with
your hands behind your back!
So - to summarize...
If you want motion on your page, you must use layers. If you want be
for your page layout, you must use tables at this point. Or not
(particularly when you
consider what you can do with CSS positioned page elements and NO tab
at
all -
http://www.csszengarden.com).
Bear in mind that advanced use of these two page elements can
significantly blur these two criteria.
And remember, the use of one does not preclude the use of the other o
same page.
Use them both if the spirit moves you.
There you go....