You are here: Re: Article putting forward a case for table layout « HTML « IT news, forums, messages
Re: Article putting forward a case for table layout

Posted by Ben C on 10/31/06 22:35

On 2006-10-31, patrick j <patrick@jamesnews.orangehome.co.uk> wrote:
> Hi
>
> I'm wondering if this article has been discussed here. I don't have any
> opinions on it as such but I think it is interesting reading.
>
><http://olav.dk/articles/tables.html>

I can't see what's wrong with using display: table and display:
table-cell if you need them. That way you can avoid presentational
markup.

So you use <td> etc. for tabular data, and display: table for grid
layouts.

Maybe that's what he's referring to when he says, "To be fair, the CSS
2.1 spec does support grid-based layout using pure CSS. Unfortunately
Internet Explorer does not support this, hence it's not really relevant
for real-world web design, even though it is supported in other
browsers".

So maybe it doesn't work in IE.

A separate question is how often do you actually need grid layouts-- a
lot of news sites for example have table-based grid layouts and are
annoying and hard to read.

Anyway, his examples can be done quite easily without tables and also
without tricks and hacks. But there are still some things you can only
do with tables.

For his form example, it's easy to get the automatic column widths by
using two floats with width: auto. In any case that pretty much is a
grid layout, as the other person said, so why not use display:
table-cell.

In the second example, you can easily use absolute positioning to put
the footer at the bottom and make the sidebar run all the way down to
footer. This seems less of a trick/hack in this case than using a table.

So when do you need tables apart from grids? Centering in either
dimension of shrink-to-fit boxes and more complex cases of dividing the
page into rows or columns whose dimensions you wish to specify in a
mixture of lengths and percentages are two examples that came up
recently.

 

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

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