Forum Moderators: open

Message Too Old, No Replies

overhead of <table> tag

         

scorpion

3:45 pm on Dec 19, 2002 (gmt 0)

10+ Year Member



Is it more efficient to have many tables on a page or to have one table with many rows? Or is it jus the same?

Also has anyone used the "invisible" white image for spacing in netscape 4.08, it's not quite so invisible you can see the borders of it...!

Thanks.

Nick_W

3:50 pm on Dec 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's more efficient to use CSS, but that's not really your question is it?

There are pros and cons. More rows will enevitablly lead to less code wich is good. THis means the browser has to calculate the entire table before it can print it to the sceen, which is bad. (really bad if you have lot's of images and such)

More tables means more code, bad. However, more tables allows the browser to render them quicker which gives the user the effect of seeing 'something' onscreen quicker, whish is gooood!

When I design with tables I like to make a 'top-table' which holds the logo, headline nad primary navigation. This means the user sees something quickly and, more importantly, get's the navigation quickly...

Nick

tedster

4:41 pm on Dec 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



More tables means more code...

More tables usually means only slightly more code - a very minimal bit in most cases. For example, I like to stack identical tables on top of each other. So, instead of this code:

</td></tr>
<tr><td>

...somewhere down the page we have this:

</td></tr></table>
<table><tr><td>

It's only 15 extra characters! That's a small price to get usable content on the screen faster.

..."invisible" white image for spacing in netscape 4.08, it's not quite so invisible you can see the borders of it

Try making it a transparent image instead of a white image. Then it really is invisible against any color background.

I often use this kind of gif to hold a minimum width in a table cell - but don't be fooled, you can still make the cell wider in some browsers, depending on any other content you place in that table colummn.

[edited by: tedster at 4:47 pm (utc) on Dec. 19, 2002]

Nick_W

4:44 pm on Dec 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's only 15 extra characters!

Not if you must specify cellpadding, border, cellspacing etc...

But agreed, even with aditional attributes it's a relatively small price to pay for quicker rendering of a page..

Nick