tables, tables everywhere...

navigation


memberships

Make payments with PayPal - it's fast, free and secure!
The Light Box.  A forum for photographers.
Photographic!
The Photo Forum

 nested tables  

Or, how do I keep things on the page where I want them?

One of the most incredible, and subsequently most abused, aspects of html tables is the ability to nest them inside each other.

Incredible because you can place your navigation links in that left border of your page and expect it to stay there. Abused because nearly everyone eventually succumbs to the urge to strictly control item placement on the page.

So, Bimjo, what's wrong with that? In the print world, not a thing. On the web, it perverts the intention of having a fluid information enivronment, with the presentation controlled by the viewer, not the author.

Now before you jump down my throat let me admit that I too have occasionally been unable to resist the urge. It's difficult not to. But you can go overboard with it.

Anywho, we're here talking about nesting tables, and to show you how, and why you might want to, not preach for or against doing it.

Okay, picking up where we were in the last session, a nested table example, this time with a background color in the main table so you can see the two nested tables inside the main table:

Cell 1 Cell 2 Cell 3
Cell 5
Cell 7 Cell 8 Cell 9
 
Cell 1 Cell 2 Cell 3
Cell 5
Cell 7 Cell 8 Cell 9

The code for this nested table structure looks like this:

<table bgcolor="#c3a3f3" align="center" cellspacing="10">
<tr>
<td>
   <table cellpadding="2" border="0">
   <tr>
   <td bgcolor="#ffff00" rowspan="2">Cell 1</td>
   <td bgcolor="#ffff00">Cell 2</td>
   <td bgcolor="#ffff00">Cell 3</td>
   </tr>
   <tr>
   <td bgcolor="#ffff00" colspan="2">Cell 5</td>
   </tr>
   <tr>
   <td bgcolor="#ffff00">Cell 7</td>
   <td bgcolor="#ffff00">Cell 8</td>
   <td bgcolor="#ffff00">Cell 9</td>
   </tr>
   </table>
</td>
<td width="20"> </td>
<td>
   <table cellpadding="2" bgcolor="#ffff00" border="0">
   <tr>
   <td bgcolor="#ffff00" rowspan="2">Cell 1</td>
   <td bgcolor="#ffff00">Cell 2</td>
   <td bgcolor="#ffff00">Cell 3</td>
   </tr>
   <tr>
   <td bgcolor="#ffff00" colspan="2">Cell 5</td>
   </tr>
   <tr>
   <td bgcolor="#ffff00">Cell 7</td>
   <td bgcolor="#ffff00">Cell 8</td>
   <td bgcolor="#ffff00">Cell 9</td>
   </tr>
   </table>
</td>
</tr>
</table>

<< back    continue >>

 yank my chain  

Feel the need to communicate with His Grand & Exalted Bimjoness hisself?? Well, here's where ya do it! Don't be shy. If you have something you'd like to see here, just let me know and I'll see what I can do about getting it on here.

Man, this page looks so... sucky!

Yep, because all the formatting on the page is controlled by CSS. You can still see everything the site has to offer, it just looks, well... sucky. You can live with it, or you can do something about it. Assuming you have control over your browser selection and the hardware necessary to upgrade.

If you are looking for alternative browsers that are standards compliant, webstandards.org has a number of options for you to explore. So, go ahead, see what this site really looks like.