Her

Home HTML and CSS Tutorials Tricks using Tables

Tricks using Tables

Author: Jeff Singer Author's URL: www.bignosebird.com More by this author

image 1"I need to have two tables sit side by side, but no matter what I do, they end up stacked. What gives?"

Example

A table must sit alone on a "line", but if we stick our tables inside of a table... guess what? It works! This is also very useful for when you have two pictures, each with a caption under it. In this example, I have BORDER=1 so you can see what is going on.

image 2 image 3 image 2
image 3 Source image 3
image 3 image 3 image 3
image 2 image 3 image 2
image 3 Result image 3
image 3 image 3 image 3
image 2 image 3 image 2
image 3
<TABLE BORDER="1" WIDTH="400">
  <TR>
   <TD>
    <TABLE BORDER="1">
     <TR>
      <TD>
       This is in our first table!
      </TD>
     </TR>
    </TABLE>
   </TD>
   <TD>
    <TABLE BORDER="1">
     <TR>
      <TD>
       And this is in the second table!
      </TD>
     </TR>
    </TABLE>
   </TD>
  </TR>
</TABLE>
image 3
image 3 image 3 image 3
image 2 image 3 image 2
image 3
This is in our
first table!
And this is in
the second table!
image 3
image 3 image 3 image 3

See Also: