Forum Moderators: not2easy

Message Too Old, No Replies

Rendering 'a page' when everything in container table versus div

What's the difference?

         

Webwork

8:29 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



As I recall, if you put your entire web page within a single table - to center the whole page, for instance - the viewer's browser won't render/display the page until the positioning of every object (table, cell, div, etc) within that container table is sorted out by position, possibly even content since that would effect relative positions.

This 'container table, with nesting' could result in the old 'blank page until massive load' situation, keeping the new visitor wondering "where's the page?".

Why isn't this true for browser rendering of pages where everything is contained within a single 'container div', one that contains multiple nested divs?

Why won't a browser withhold displaying the page while it sorts out positioning within the container div?

Won't the delay be the same as if it was all contained within a container table?

If not, why not? What's your authority (besides intelligence and experience far superior to mine?)

DrDoc

9:02 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Technically you can get a table to render incrementally without having to wait for all content to first load.

[w3.org...]
[w3.org...]

However, because very few people realize this (and browser support has been spotty) most web designers are under the impression that tables have to wait for all content to render... starting with the innermost table. But, that is not necessarily the case. It entirely depends on whether the number of columns etc has been defined or not.

The technical reason why divs are not plagued by this is that a div itself is a single element, always. A table, however, does not exist without rows and cells. Thus, before the table knows how big it is supposed to be it has to wait for all <tr> and <td> elements to load (up until the closing </table>) before size can be determined. In the case of a table used as a wrapper for the whole page, the entire page therefore has to load before reaching </table> for the first table. Specifying the number of columns (as described on the above pages) avoids this problem.