tables

K

KED

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.
 
D

David Dorward

KED said:
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.

Alter the left and right margins in the stylesheet, both auto to centre it,
one at 0 to align it to that side.
 
H

Harlan Messinger

KED said:
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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top