HighDots Forums  

beginner Q...do layers overide tables?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss beginner Q...do layers overide tables? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
redpen99
 
Posts: n/a

Default beginner Q...do layers overide tables? - 07-14-2004 , 09:03 AM






Just started working in DW
I have read all the advice about avoiding layout mode like the plague, so I
will. However when laying out is it better to work in layers or directly in
tables?
Can anyone guide me to a good tutorial for working with layers?

Thanks
Sandi


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: beginner Q...do layers overide tables? - 07-14-2004 , 09:15 AM






Use whatever works best for you.

Here's a post I have repeated (and updated) more than once here about layers
and tables -
you may find it helpful -

Quote:
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 the
community to generally refer to absolutely positioned <div> tags, and
Dreamweaver has
propagated that usage. In fact, there is really no such HTML thing as a
layer, but for the purposes of this discussion let's use the Dreamweaver
sense of applying that term to absolutely positioned <div>s.

==============================
In plain talk, a layer is like a magic carpet - it floats above your page
content (any page content, including tables, images, text, etc.). It is
unaffected by page margin settings because it is not really *on* the page.
You can whisk it around on the page to provide motion (using timelines).
You can make it visible or invisible using any of the actions appropriate
to
your browser selection (like onMouseOver, onClick, onLoad, etc.). You can
dynamically clip or scroll the contents of layers to provide a windowed
effect within a page. Layers are wondrous constructs that let you bring
your pages to life! Get to know them - they are your friends....
=================

I would add in clarification and elaboration that layers are positionable
elements and as such allow you to put content at any location you desire,
regardless of the remainder of the content on the page.

The downside to layers is the flip-side of their real benefit. Because
they
are absolutely positioned, they will be static page elements, i.e., they
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, or
*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 be
done
with custom js or advanced CSS.

If you consider that a 'layer' is really just a 'division' or <div> tag on
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 for use
as a page layout tool!
This impression is certainly true. As you become more familiar with CSS,
you will learn how to
replace a large part of your current page layout methodology with pure CSS
positioned page
elements. But it's something you should take your time with. It *is* the
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 ease
with
which they can be positioned. I do not recommend this approach for anyone
that is new to layers or to CSS in general because it can be confusing and
troublesome. This is partucularly the case if you will have multiple
layers, each
containing nominally uncontrolled/unstyled text. Viewers resizing this
text in their
browsers will see a disappointing overlap of paragraphs that is surely NOT
what you desire.

Tables, on the other hand, are most everything that layers are not! They
are flexible page elements, in that native HTML can center, or right or
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 as a
means of displaying tabular data *only*, tables quickly became the
principal
structural element used in page layout. They can be made rigid in order
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 - but
there are quirks that must be learned to use them successfully. Luckily,
most of these quirks are discussed here daily and are illuminated on the
several sites devoted to Dreamweaver/HTML issues, including the Macromedia
Technotes link in my sig below. In spite of these quirks, however, if you
intend
to be a credible web developer, you must learn how to build stable tables
with
your hands behind your back!

So - to summarize...

If you want motion on your page, you must use layers. If you want bedrock
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 tables
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 on the
same page.
Use them both if the spirit moves you.

There you go....


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"redpen99" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Just started working in DW
I have read all the advice about avoiding layout mode like the plague, so
I
will. However when laying out is it better to work in layers or directly
in
tables?
Can anyone guide me to a good tutorial for working with layers?

Thanks
Sandi




Reply With Quote
  #3  
Old   
David Stiller
 
Posts: n/a

Default Re: beginner Q...do layers overide tables? - 07-14-2004 , 09:25 AM



What Dreamweaver calls "layers" are actually <div> tags, which are block
level elements (just like tables). In the end, it's all simply HTML. (You
can also use the <layer> tag, by the way, but <div> tags are where it's at,
mainly because <layer> is a Netscape-proprietary tag.)

When you absolutely position a <div> tag, you are applying CSS that
tells the <div>, "Hey, move yourself here ... be such-and-such tall and
such-and-side wide." In fact, you can see this by drawing a layer in
Dreawmweaver in a brand new document, then flipping to Code view to see what
happens. You may get something like this ...

<div id="Layer1" style="position:absolute; left:122px; top:22px;
width:133px; height:111px; z-index:1"></div>

.... which, again, is simply a <div> tag with styling applied to it. If you
put some text or an image inside the opening and closing tags <div ...> TEXT
HERE </div>, that content will appear inside the "layer" you just drew. If
you change those numbers by directly typing in new values, you'll see a
visual change in the "layer" itself in Design view.

When people get into heated arguments about how to design using CSS only
(often called "tableless design") it gets a bit more complicated.
Typically, this is because developers will use techniques like floating to
make <div> tags wrap around each other ... and usually, there's a lot more
"relative" positioning than "absolute" positioning (at least in my
experience), to allow your layout to be more fluid and, for example, adjust
as the browser resizes.

If it's the more advanced stuff you're after, I recommend
http://www.alistapart.com and just dig around. You can spend a lot of time
there. Another good one (more for beginners) is http://www.mako4css.com/
.... read about positioning. Most of all, dive in and have fun. Just
remember that it's HTML you're dealing with, not a unique IDE like
Dreamweaver. You could do all of this in Notepad if you had the patience.
Dreamweaver is your genie, but you're the master ... and it's HTML you're
the master of.


David
stiller ( at ) quip ( dot ) net


"redpen99" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Just started working in DW
I have read all the advice about avoiding layout mode like the plague, so
I
will. However when laying out is it better to work in layers or directly
in
tables?
Can anyone guide me to a good tutorial for working with layers?

Thanks
Sandi




Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: beginner Q...do layers overide tables? - 07-14-2004 , 09:39 AM



Quote:
What Dreamweaver calls "layers" are actually <div> tags, which are
block
level elements (just like tables). In the end, it's all simply HTML.
(You
can also use the <layer> tag, by the way, but <div> tags are where it's
at,
mainly because <layer> is a Netscape-proprietary tag.)
And only supported in NN4x.

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"David Stiller" <stiller-NO-SPAM- (AT) quip (DOT) net> wrote

Quote:
What Dreamweaver calls "layers" are actually <div> tags, which are
block
level elements (just like tables). In the end, it's all simply HTML.
(You
can also use the <layer> tag, by the way, but <div> tags are where it's
at,
mainly because <layer> is a Netscape-proprietary tag.)

When you absolutely position a <div> tag, you are applying CSS that
tells the <div>, "Hey, move yourself here ... be such-and-such tall and
such-and-side wide." In fact, you can see this by drawing a layer in
Dreawmweaver in a brand new document, then flipping to Code view to see
what
happens. You may get something like this ...

div id="Layer1" style="position:absolute; left:122px; top:22px;
width:133px; height:111px; z-index:1"></div

... which, again, is simply a <div> tag with styling applied to it. If
you
put some text or an image inside the opening and closing tags <div ...
TEXT
HERE </div>, that content will appear inside the "layer" you just drew.
If
you change those numbers by directly typing in new values, you'll see a
visual change in the "layer" itself in Design view.

When people get into heated arguments about how to design using CSS
only
(often called "tableless design") it gets a bit more complicated.
Typically, this is because developers will use techniques like floating to
make <div> tags wrap around each other ... and usually, there's a lot more
"relative" positioning than "absolute" positioning (at least in my
experience), to allow your layout to be more fluid and, for example,
adjust
as the browser resizes.

If it's the more advanced stuff you're after, I recommend
http://www.alistapart.com and just dig around. You can spend a lot of
time
there. Another good one (more for beginners) is http://www.mako4css.com/
... read about positioning. Most of all, dive in and have fun. Just
remember that it's HTML you're dealing with, not a unique IDE like
Dreamweaver. You could do all of this in Notepad if you had the patience.
Dreamweaver is your genie, but you're the master ... and it's HTML you're
the master of.


David
stiller ( at ) quip ( dot ) net


"redpen99" <webforumsuser (AT) macromedia (DOT) com> wrote in message
news:cd3av7$mjv$1 (AT) forums (DOT) macromedia.com...
Just started working in DW
I have read all the advice about avoiding layout mode like the plague,
so
I
will. However when laying out is it better to work in layers or directly
in
tables?
Can anyone guide me to a good tutorial for working with layers?

Thanks
Sandi






Reply With Quote
  #5  
Old   
redpen99
 
Posts: n/a

Default Re: beginner Q...do layers overide tables? - 07-19-2004 , 09:19 AM



Hi Murray and David

Thanks for all the information.

I am busy creating a site, which was meant to be a simple site consisting of a
few pages, which I had planned to do in a few nested tables, however the client
would like it to be able to incorporate a databasing function in a few months
time. I have been advised to work in XHTML and CSS, does this mean I shouldn't
use tables at all?

Thanks
Sandi


Reply With Quote
  #6  
Old   
David Stiller
 
Posts: n/a

Default Re: beginner Q...do layers overide tables? - 07-19-2004 , 01:35 PM



Sandi,

The current recommended practice is to use tables when displaying
tabular data (things that *look* like tables, such as search results,
contact lists, etc.) and to avoid tables when designing page layouts.


David
stiller ( at ) quip ( dot ) net


"redpen99" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi Murray and David

Thanks for all the information.

I am busy creating a site, which was meant to be a simple site consisting
of a
few pages, which I had planned to do in a few nested tables, however the
client
would like it to be able to incorporate a databasing function in a few
months
time. I have been advised to work in XHTML and CSS, does this mean I
shouldn't
use tables at all?

Thanks
Sandi




Reply With Quote
  #7  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: beginner Q...do layers overide tables? - 07-19-2004 , 02:06 PM



And the practical advice is this - use what works best for you.

Here's a post I have repeated (and updated) more than once here about layers
and tables -
you may find it helpful -

Quote:
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 the
community to generally refer to absolutely positioned <div> tags, and
Dreamweaver has
propagated that usage. In fact, there is really no such HTML thing as a
layer, but for the purposes of this discussion let's use the Dreamweaver
sense of applying that term to absolutely positioned <div>s.

==============================
In plain talk, a layer is like a magic carpet - it floats above your page
content (any page content, including tables, images, text, etc.). It is
unaffected by page margin settings because it is not really *on* the page.
You can whisk it around on the page to provide motion (using timelines).
You can make it visible or invisible using any of the actions appropriate
to
your browser selection (like onMouseOver, onClick, onLoad, etc.). You can
dynamically clip or scroll the contents of layers to provide a windowed
effect within a page. Layers are wondrous constructs that let you bring
your pages to life! Get to know them - they are your friends....
=================

I would add in clarification and elaboration that layers are positionable
elements and as such allow you to put content at any location you desire,
regardless of the remainder of the content on the page.

The downside to layers is the flip-side of their real benefit. Because
they
are absolutely positioned, they will be static page elements, i.e., they
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, or
*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 be
done
with custom js or advanced CSS.

If you consider that a 'layer' is really just a 'division' or <div> tag on
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 for use
as a page layout tool!
This impression is certainly true. As you become more familiar with CSS,
you will learn how to
replace a large part of your current page layout methodology with pure CSS
positioned page
elements. But it's something you should take your time with. It *is* the
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 ease
with
which they can be positioned. I do not recommend this approach for anyone
that is new to layers or to CSS in general because it can be confusing and
troublesome. This is partucularly the case if you will have multiple
layers, each
containing nominally uncontrolled/unstyled text. Viewers resizing this
text in their
browsers will see a disappointing overlap of paragraphs that is surely NOT
what you desire.

Tables, on the other hand, are most everything that layers are not! They
are flexible page elements, in that native HTML can center, or right or
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 as a
means of displaying tabular data *only*, tables quickly became the
principal
structural element used in page layout. They can be made rigid in order
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 - but
there are quirks that must be learned to use them successfully. Luckily,
most of these quirks are discussed here daily and are illuminated on the
several sites devoted to Dreamweaver/HTML issues, including the Macromedia
Technotes link in my sig below. In spite of these quirks, however, if you
intend
to be a credible web developer, you must learn how to build stable tables
with
your hands behind your back!

So - to summarize...

If you want motion on your page, you must use layers. If you want bedrock
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 tables
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 on the
same page.
Use them both if the spirit moves you.

There you go....



--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"David Stiller" <stiller-NO-SPAM- (AT) quip (DOT) net> wrote

Quote:
Sandi,

The current recommended practice is to use tables when displaying
tabular data (things that *look* like tables, such as search results,
contact lists, etc.) and to avoid tables when designing page layouts.


David
stiller ( at ) quip ( dot ) net


"redpen99" <webforumsuser (AT) macromedia (DOT) com> wrote in message
news:cdghor$dul$1 (AT) forums (DOT) macromedia.com...
Hi Murray and David

Thanks for all the information.

I am busy creating a site, which was meant to be a simple site
consisting
of a
few pages, which I had planned to do in a few nested tables, however the
client
would like it to be able to incorporate a databasing function in a few
months
time. I have been advised to work in XHTML and CSS, does this mean I
shouldn't
use tables at all?

Thanks
Sandi






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.