Layers vs Tables???

R

RF

Folks,

Layers - I just started playing with them a little today, and I am starting
to think that
they may server my site better than tables, (which I have generally used to
place text on a page). Can you give me some pros and cons? Are there limits
to how many you can have? Do they create large files? I saw that they should
not be used with tables,
and I was wondering if I should convert my existing tables.

Thanks,

RF
 
J

Jon Spivey

That's kind of a million dollar question in web design at the moment.
There's 3 ways to layout a page
1/ Tables
2/ Layers (positioned divs)
3/ Static divs (non-positioned divs)
or any combination of the above. There's seems to be 1 group of people who
say never use tables for layout, only use them for tabular data and another
group who still stick with the old nested table approach. My preference is a
middle ground - to use 1 simple table for layout - ie 1 row and 2 or 3
columns and style everything within your layout table with CSS, this way you
can pretty much avoid nested tables. Whichever route you go down the first
step is to get a strong knowledge of CSS - this will be essential however
you layout a page.

Browser support for layers is almost as universal as support for tables but
thats not to say you can just stick layers on a page and hope for the best -
there's a learning curve as with anything else. Do you have a url we can
look at? It might be easier to give you more concrete advice if we can see
what you're working on.

Jon
Microsoft MVP - FP
 
C

chris leeds

I'm glad that's the way you see it. it kind of validates my feelings.
there's nor real reason to belong to either "extreme" camp. plus the cells
provide excellent opportunities to "class" stuff.
IMHO
 
J

Jon Spivey

Would that be javascript validation or server side :)

Seriously though, I see CSS "zealots" saying never use tables unless it's to
display "tabular data". I'd argue with anyone that the easiest way to make a
bulletproof 2 or 3 column layout is with a table. It works, it validates and
it's easy to build and maintain.

Then some of the "old timers" in this group that can do anything as long as
it involves tables nested 5 deep and I think why. You could do the same
thing with 5 lines of CSS and save yourself a lot of time and you (or your
successor) a lot of maintenance.

We used to have a politician here in UK a few years ago (he weighed about
400lbs) his catchphrase was if the fence is strong enough I'll sit on it. I
think the fence is still pretty strong :)

Jon
Microsoft MVP - FP
 
K

Kevin Spencer

Well, Jon, I have to argue on the side of the "zealots" since nobody else
will. ;-)

Using a table for layout locks you into that particular tabular layout. You
can't move the items in the cells to other locations in the page if you wish
to redesign. You are limited to only moving elements relative to the table
cells they reside in. As http://csszengarden.com illustrates beautifully,
using divs alone gives you the most flexibility with regards to layout.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
B

Bob

Well, Jon, I have to argue on the side of the "zealots" since nobody else
will. ;-)

Well, there's plenty of groups we can crosspost this too if you really
want some rabid support :)
Using a table for layout locks you into that particular tabular layout. You
can't move the items in the cells to other locations in the page if you wish
to redesign. You are limited to only moving elements relative to the table
cells they reside in. As http://csszengarden.com illustrates beautifully,
using divs alone gives you the most flexibility with regards to layout.


OK... then I'll argue the other side. Using CSS-P gives you a fallback
look that is unacceptable in the commercial environment.
 
R

RF

Thanks for the followup guys, I do not have a url yet as I am still in the
early stages of development. My problem is that I have all of my data down
on the linked pages, I am just trying to come up with a new style.

RF
 
K

Kevin Spencer

OK... then I'll argue the other side. Using CSS-P gives you a fallback
look that is unacceptable in the commercial environment.

It all depends on how you construct your HTML.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
B

Bob

It all depends on how you construct your HTML.

If you follow the "standards", the fallback for CSS-P is a 1995 look
for your site. If you get more creative and mix HTML with CSS for
formatting, the aforementioned purists will have you burned at the
stake over a smokeless fire. :)
 
K

Kevin Spencer

Hi Bob,

Certainly a valid point. I'm not a "CSS Evangelist." Just want to make sure
that everyone sees all sides of the issue, which you have contributed to
very well. The decision must necessarily be made on a case-by-case basis,
and with understanding of all issues involved. Hopefully, this discussion
has helped others to make good determinations for themselves.

--
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
B

Bob

Hi Bob,

Certainly a valid point. I'm not a "CSS Evangelist." Just want to make sure
that everyone sees all sides of the issue, which you have contributed to
very well. The decision must necessarily be made on a case-by-case basis,
and with understanding of all issues involved. Hopefully, this discussion
has helped others to make good determinations for themselves.

I hear ya. I don't get too excited about either viewpoint myself. I
do find the academics/standardists/extremists a little alarming at
times.

I think it's important for people to realize that *every* approach on
the web is a compromise in one area or another.
 
Top