W3C home > Mailing lists > Public > www-style@w3.org > June 2007

Re: Stylings only possible with Tables

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Wed, 27 Jun 2007 11:44:53 -0700
Message-ID: <000701c7b8eb$40409c70$f502000a@internal.toppro.net>
To: "Raul Dias" <raul@dias.com.br>, "Spartanicus" <mk98762@gmail.com>
Cc: <www-style@w3.org>


----- Original Message ----- 
From: "Raul Dias" <raul@dias.com.br>
To: "Spartanicus" <mk98762@gmail.com>
Cc: <www-style@w3.org>
Sent: Wednesday, June 27, 2007 9:31 AM
Subject: Re: Stylings only possible with Tables


>
> On Wed, 2007-06-27 at 02:39 +0100, Spartanicus wrote:
>> James Elmore <James.Elmore@cox.net> wrote:
> ...
>
>> >What if users want normal
>> >blocks, with margins, padding, etc., but want them aligned in a grid? 
>> >They must
>> >use tables.
>>
>> Again only when footers are required, or for column layouts when their
>> height must extend to the largest of the columns. And again, HTML tables
>> used for layout are not the problem some claim they are.
>
> The rationally I have read so far when I raised the question about
> having a height of 100% in a child of a non-specific height parent was
> about incremental rendering.  Now tables, specially in layout, breaks
> (or can break the incremental rendering).  Tables are not going away any
> time soon, so I ask again why not height: 100%.
>

Slightly out of theme. About incremental rendering and flexible layouts.

Let's say we have following markup:

<body>
<p class="header">Header</p>
<div class="content">Some long content</div>
<p class="footer">Footer</p>
</body>

And following styling:

body { height: * } /* takes everything that left in the view
                               from body margin and paddings */

div.content { height: * } /* takes everything that left in the
                                        container (body here) from margin
                                        and paddings and other non-flex
                                        elements (header and footer here) */

There are two scenarios:
1) intrinsic height of div.content is less than space available.
    In this case p.footer will be at the bottom of the view,
   div.content will span all visible area. Content is small
   so not incremntal rendering is required.
2) height of div.content is greater than space available.
    In this case p.footer will be out of the view and no
    computation of flexes is required so long documents
    can be rendered incrementally as it is now.

Markup and styling above can be modelled in
quirks mode as:

<table height=100% width=100%>
<tr><td class="header">Header</td></tr>
<tr><td class="content" height=100%>Some long content</td></tr>
<tr><td class="footer">Footer</td></tr>
</table>

This requires twice more DOM elements and does
not allow incremental rendering.

> The use of tables for layout can be the problem when you want to have
> the same content on different medias.
>

Yep, this too.

Andrew Fedoniouk.
http://terrainformatica.com 
Received on Wednesday, 27 June 2007 18:46:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:51 GMT