You are here: Re: Css-Layout vs Table-Layout « HTML « IT news, forums, messages
Re: Css-Layout vs Table-Layout

Posted by Philip on 06/19/06 22:21

In article <1150745255.168071.262870@r2g2000cwb.googlegroups.com>,
"TC" <gg.20.keen4some@spamgourmet.com> wrote:
> > > Here's a very simple example: http://102673.atspace.com/tables.htm
> > > What would be a specific, real-world benefit of changing that table to
> > > DIV's + CSS instead?
> >
> > Well, I think the recommendation would be to change it to UL/LIs rather
> > than just generic DIVs. One advantage of this approach would be that you
> > could change the list to a numbered list by just changing the UL to an OL.
>
> I'm not sure that I understand you. I don't *want* that table to look
> like a list. I want it to look exactly the way that it currently does.
> Are you saying that I could get the same look, by changing the info to
> lists & then styling those lists? If so, what would be the specific
> advantage? IOW, why would I bother? Wouldn't I just get lots of LIs
> (versus lots of TDs)?

As others have pointed out and you yourself have acknowledged, that data
already lends itself pretty well to tabular presentation. However, if
you did it with styled lists instead, the advantages that I pointed out
in my previous method would still apply. In addition, I think it'd be
easier to change the look of the page using CSS. If you decided you
wanted a column left-aligned rather than centered, for instance, you
could either change the style in one place or the align property on each
TD. A text editor's search & replace makes the latter function pretty
easy, but you have to be careful not to accidentally change the align
property on any other elements in that file.

Or suppose your HTML was being generated by a script written by someone
else, and you were the graphic designer charged with making it look
pretty. I think you'd find the list & div version easier to work with.

Now, your question was not a theoretical one but a practical one of why
*you* would want to convert *that* particular page, and I don't have a
compelling argument. Tables aren't bad as long as they're used to
present tabular data. I use them here:
http://nikitathespider.com/articles/RobotsTxt.html


> > It is easier for automated tools to process content when it is separated
> > from presentation, hence the value of something like XML+XSLT.
>
> I've had one brush with XSL. I don't intend to have another! :-(

I've had the same reaction, but for me it was a result of using the
wrong tool for the job.

> Thanks for all your other comments, which I have read & digested. It's
> now 5am here, so I am off to bed & will get back to this thread in 12
> hours or so.

Sleep well!

--
Philip
http://NikitaTheSpider.com/
Bulk HTML validation, link checking and more

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация