PDA

View Full Version : Why NOT use layers?


likegluelikecrew
11-01-2005, 02:25 AM
I've heard it time and time again... "oh, don't use layers, they will mess up your pages big time." Or "stick with tables and CSS."

But really, are there concrete reasons why I should stay away from doing my page layouts in Dreamweaver using layers? They seem pretty cool and an easy way to graphically place content. Are there browser compatibility issues or something?

If someone could provide some concrete reasons, I'd love to hear them, thanks...

We Are 138

davidj
11-01-2005, 08:59 AM
i am not by any means a CSS - layer guru but here is my take on it

it boils down to control over design

layers or <div>'s were developed as a replacement for table layouts
You dont have much in the way of layout options when dealing with tables but with layers (<div>'s) you have pixel Precision. Layers can overlap (float) or be rigid like a table.

There are somethings to take on board. To emulate a complex table structure in a <div> layout may take more time to get it the way you want it and then you have cross browser issues.

It seems there is allot of developers jumping from tables to layers due to the control they now have over layouts

dreamlynx
11-02-2005, 08:43 PM
The fact is USE BOTH. There are very good reasons for using both layers and tables. Any one who says different is completely wrong. Keep an open mind be very creative and never limit yourself to one style.

As we say in the movie business. you are the feature bring that out in hat ever form you use.

Dan

domedia
11-02-2005, 09:02 PM
Any one who says different is completely wrong. Keep an open mind
;)

gmcrone
11-02-2005, 09:51 PM
According to the W3C there is no tag called "layer"

A layer is just a container for CSS properties.

A "layer" can be a div, a span, an H1, etc...

Dreamweaver incorrectly labels a "layer" as a div

(sorry, had to get that off my chest)

CSS layers control the layout or presentation of the page
HTML/XHTML is the semantic markup of the page.

Tables are still valid markup but should be used for what they were intended for, which is the presentation of tabular data.

The future is CSS. The W3C has stopped creating any new HTML recommendations and has gone with XHTML.
Your pages, if written in the current recommendations, will be more compatable with the next generation browsers and current ones.

Mike....