Click here to get back home

HTML Tables vs. CSS Layers - when function and form coincide

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
HTML Tables vs. CSS Layers - when function and form coincide www.gerardvignes.com 01-30-2007
Get Chitika Premium
Posted by www.gerardvignes.com on January 30, 2007, 3:25 am
Please log in for more thread options


I was checking out a website offered as an example for another job,
and I was struck by how clean and professional the site is.

http://www.colorlines.com/

I was poking around, and I noticed that they are still using HTML
Tables for content. I realize that many sites still use HTML Tables
for their content, but it is generally discouraged in favor of CSS
Layers.

This internal debate gave me a headache and caused me to ponder the
following question...

Is it appropriate to use HTML Tables to format content that is not
strictly tabular data (with captions and column headers) --- provided
the content belongs in a tableau format?

Future generations have the right to know. Do you have an opinion?

Thanks,

Gerard Vignes
http://www.GerardVignes.com
Seattle, WA


Posted by Ben C on January 30, 2007, 3:34 am
Please log in for more thread options


> I was checking out a website offered as an example for another job,
> and I was struck by how clean and professional the site is.
>
> http://www.colorlines.com/
>
> I was poking around, and I noticed that they are still using HTML
> Tables for content. I realize that many sites still use HTML Tables
> for their content, but it is generally discouraged in favor of CSS
> Layers.
>
> This internal debate gave me a headache and caused me to ponder the
> following question...
>
> Is it appropriate to use HTML Tables to format content that is not
> strictly tabular data (with captions and column headers) --- provided
> the content belongs in a tableau format?
>
> Future generations have the right to know. Do you have an opinion?

If you want tabular format but the data is not "intrinsically" a table,
you should use appropriate tags for the data (li, etc.) and format as a
table using display:table, display:table-cell etc. in the stylesheets.
Probably doesn't work in IE, but for future generations IE will be no
more than a distant memory anyway.

Posted by Andy Dingley on January 30, 2007, 5:43 am
Please log in for more thread options




wrote:
> http://www.colorlines.com/

> Is it appropriate to use HTML Tables to format content that is not
> strictly tabular data

Of course not, but the definition of "tabular" is subtle. It's
certainly more than just "telephone directories"

If you insist on a "grid layout", then <table> is appropriate. A
"grid" here means a rectilinear arrangement of cells and columns _and_
where the height of adjacent columns depends on its neighbours. This
is the characteristic that can't be emulated by CSS otherwise, except
by JavaScript tricks that are less favoured than <table>.

The site you describe is visually quite well done, although it could
still use some fixes (on my browser the unset background colour ends
up as turquoise). It works well with pre-CSS <table> markup because
it's heavily dependent on images, and images are inherently pixel-
sized. The big practical problem with pre-CSS <table> markup
(assuming competent work) is that their sizing is pixel-based and
doesn't re-fflow well if the ratio between text size and windo size
varies.

This site doesn't need <table> markup. It's really three independent
columns, with vertical blocks in each column and a further pair of
columns splitting the centre column after the lead article. On the
whole I'd _rather_ do it with nested <div>s (three deep) because the
<table> isn't adding much (we don't need to vertically align the
columns) and the <table> either still needs to be nested, or it's
requiring some awkward use of colspan for the lead article.


Posted by www.gerardvignes.com on January 30, 2007, 6:29 am
Please log in for more thread options


Thanks Andy!

Tableau and tabular were poor choices of word on my part. Your term
"Grid Layout" is much more meaningful.

What you are proposing, using nested divs instead---does that require
css positioning (specifying an absolute position) to get a double- or
triple-column effect?

I admit that I don't like nested tables. That probably represents the
worst abuse of tables.

Thanks Again,

Gerard Vignes
http://www.GerardVignes.com
Seattle, WA


Posted by www.gerardvignes.com on February 3, 2007, 7:05 pm
Please log in for more thread options


I did some investigation, and it turns out that CSS Positioning is the
only practical way to get multiple columns without using Tables.

Note that Css Positioning does not work in all browsers. It is tricky
to get working right for pages that dynamically resize to accomodate
changes in user-specified font size or browser window width.

Tables work in most browsers. They can be easily crafted to
dynamically respond to changes in font size and browser window width.

I am not advocating wholesale use of tables to format web pages, but
it looks like Tables still have significant advantages when formatting
multiple columns on a single page. They are simpler to get working
properly and also support a wider range of browsers.

Note also that multiple column pages made with Css Positioning or
Tables do not automatically flow from one column to the next as with
MS Word or Pagemaker. That flow would have to be managed by the
program that created the display and/or populated it with data.

Thanks,

Gerard Vignes
http://www.GerardVignes.com
Seattle, WA


Similar ThreadsPosted
layers compatibility August 5, 2005, 6:38 am
positioning layers April 25, 2006, 7:40 am
2 layers fixed background ? July 17, 2004, 5:20 pm
layering images without layers? June 4, 2008, 4:04 pm
PDF's not hiding along with layers. Shows through. March 9, 2005, 10:50 pm
Rendering problems with Mac Firefox and Layers December 5, 2005, 3:44 pm
show hide layers + scroll probs under Mac September 21, 2004, 11:03 am
Problem with HTML tables November 10, 2006, 6:08 pm
comparing HTML tables May 12, 2007, 9:47 am
aligning multipule tables in html October 22, 2004, 3:58 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap