Print

To center a table use CSS as below

table{

margin:1em auto;

}

1em means one blank line at the top and bottom of the table.

auto means to calculate the left and right margins so they are equal horizontally.

The table can also be floated just like an image.  ie. float:left; or float:right; if you want the table to have text along the side.

Comments (0)

500 characters remaining

Cancel or