You are here: Re: CSS vs. tables // fixed vs. variable « HTML « IT news, forums, messages
Re: CSS vs. tables // fixed vs. variable

Posted by Beauregard T. Shagnasty on 11/04/23 11:58

Chris wrote:

> Beauregard T. Shagnasty wrote:
>
>> Chris wrote:
>>
>>> I've already read several times that CSS should be used instead of
>>> tables to layout your pages. But why is that actually?
>>
>> Were there reasons given where you read that? What did they say?
>>
> No reasons given, that's why I wonder. Also, styling a fixed width
> and/or table layout is a lot easier. I try to use only DIV's
> according to the recommendations, but I would just like to know why I
> am doing all the extra effort.

Practically all of the Usenet discussions I've read on this topic always
give reasons.

>> Tables are for .. tabular data. A quick Google turns up a couple
>> thousand times this has been discussed. Here's one:
>>
> <http://groups.google.com/group/alt.html/browse_thread/thread/a9fa57c1f35eeac1/45bce92624068442?lnk=st&q=tables+vs+css+for+layout&rnum=7#45bce92624068442>
>>
>> Main reason: separate content from presentation.
>>
> The fact that it has a couple of thousand times been discussed must show
> that it's not clear to many people.

Those who find this group and come and ask are new to the concept,
that's all. Also, most do not search for past articles before asking all
over again.

Those of us who have eschewed tables-for-layout long ago already know
how much easier it is.

> Also I see many websites still make use
> of table layouts and they don't look bad at all.

Sure, some/many of them *look* ok ...

> The main reason that you state is not clear to me. If I use a table for
> layout, then to me that's part of the presentation. I can even style the
> table with CSS in my stylesheet.

One of the problems with tables is they are not linear. How about how
they "display" in a speaking browser? Does it read it column by column?
Or row by row?

Using CSS for layout, there is a lot less code, it is much easier to
maintain (and write, once you understand it), and search engines and
speaking browsers have an easier time of it.

>>> And why is fixed width layout so bad?
>>
>> What is the width of my browser window?
>>
> the max size of your browser window is at least 1024px

My browsers are never maximized. If you had a fixed layout of, say,
800px, it *might* fit, but next time my browser may be around 700px
because I have another window opened next to it.

http://allmyfaqs.net/faq.pl?Tableless_layouts
http://allmyfaqs.net/faq.pl?Screen_size
http://allmyfaqs.net/faq.pl?AnySizeDesign

The only tables at this site of mine are for .. tabular data. <g>
http://countryrode.com/

--
-bts
-Motorcycles defy gravity; cars just suck.

 

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

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