|
Posted by Chris on 09/21/06 17:26
Beauregard T. Shagnasty wrote:
> 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.
>
I'm not new to the concept, just looking to expand my knowledge with
insights that I may have overlooked so far or which I haven't come across
yet.
Saying that answers can be found somewhere on the Internet is like saying
that the needle is somewhere to be found in the haystack.
Somehow I find it strange that my question seems to irritate so many people
and yet they take the effort to reply, although in an unpleasant way. Why
answer if you don't like the question? It's like the people that get upset
from watching a TV program they don't like. Why not just switch channel,
there are plenty. Same here, if someone does not like my question, don't
reply, there are plenty of other questions!
>> 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.
>
This is imho probably the best reason to use CSS, code readability. But
table layouts seem to be more consistent across browsers. Occasionaly I
visit websites that impress me by their simplicity and degree of
organization of content. At those times I do the effort to look at the
source, then to discover that they make use of tables to layout the page.
That's just an observation, not a fact. Of course, CSS layout is a lot more
advanced, but to make it consistent across browsers, it seems to require
the most mysterious hacks. When that's the case, the argument of readablity
looses strength, because although the html page is very readable, the CSS
file is not.
>>>> 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.
>
I think that there is also something as too much accomodating the visitor of
your website. I've read threads about coding forms that point to the same
direction. Some forms on certain websites are so "overcoded" that they
become unusable. E.g. it has already happened to me that I was not able to
fill in my address because the coder of the form already made certain
(wrong) assumptions about how my postal code should look like. That's why I
wouldn't worry too much about a visitors browser window. If my website does
not fit in his window, because he has another application next to it, then
he will have to adjust its size. With that respect a width of 800px seems
to be a current standard practice.
> 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/
>
[Back to original message]
|