XHTML & CSS
Backgrounds

<!-- ~~~~~~~~~~~~~  CODE ~~~~~~~~~~~ -->

<table style="width: 200px;
                     height: 400px;
                     margin-left: auto;
                     margin-right: auto;"
                      border="1"
                     cellpadding="2"
                     cellspacing="2">
  
    <tr>
      <td style="vertical-align: middle;
       text-align: center;">1
      </td>
      <td style="vertical-align: middle;
       text-align: center;">2
      </td>
      <td style="vertical-align: middle;
       text-align: center;">3
      </td>
    </tr>
    <tr>
      <td style="vertical-align: middle;
       text-align: center;">4
      </td>
      <td style="vertical-align: middle;
       text-align: center;">5
      </td>
      <td style="vertical-align: middle;
       text-align: center;">6
      </td>
    </tr>
    <tr>
      <td style="vertical-align: middle;
       text-align: center;">7
      </td>
      <td style="vertical-align: middle;
       text-align: center;">8
      </td>
      <td style="vertical-align: middle;
       text-align: center;">9
      </td>
    </tr>
 
</table>

How it looks in the browser
1
2
3
4
5
6
7
8
9

You can set the Height & Width of the table in the <table>.

Height and Width can be in percentage of the page
<table style="width: 80%;" >
or in numbers
<table style="width: 200px;">
Individual rows can be set as well
<tr style="height: 30px;">

Most of the time you will do this as a syle for the whole table
table { width: 200px;
            height: 400px;
            margin-left: auto;
           margin-right: auto;
         }



Author - Alan Dunbar
Creative Commons Licence
Valid XHTML 1.0