Re: Stylings only possible with Tables

----- 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 UTC