Question : How can I center my table in relation to the width of my defined body-width in XHTML 1.0 Transitional?

How can I center my table in relation to the width of my defined body-width in XHTML 1.0 Transitional?

Now, when I enclose my table (width 500) with  
1:
<div align="center">
, the table centers in relation to the whole screen, not in relation to the body width as I want. In the beginning of the XHTML-document, I set
1:
<body>
to width="800" and there are no other parts that are "breaking" that width.        

Answer : How can I center my table in relation to the width of my defined body-width in XHTML 1.0 Transitional?

<body>
<div style="width:800px;margin:0 0;text-align:center;" >
<table align="center">
<tr>
<td>
...
...
</td>
</tr>
</table>
</div>
Random Solutions  
 
programming4us programming4us