Posted by Harlan Messinger on 09/07/06 18:51
KED wrote:
> i was wondering how to align a table exactly where you want it on a
> page.
>
> by that i mean if i want the table in the center, or the left.
> Basically how do i get the table exactly where i want it on the page.
>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Table Alignment</title>
<style type="text/css">
table { border: thin solid black; }
table.left { margin-left: 0; margin-right: auto; }
table.right { margin-left: auto; margin-right: 0; }
table.center { margin-left: auto; margin-right: auto; }
</style>
</head>
<body>
<table class="left"><tr><td>LEFT</td></tr></table>
<table class="right"><tr><td>RIGHT</td></tr></table>
<table class="center"><tr><td>CENTER</td></tr></table>
</body>
</html>
[Back to original message]
|