I am trying to center a table within a div but the table can be of varying length. The code looks something like this:
<div>
<table>
<tr> .... </tr>
</table>
</div>
The div
element is of course display:block
and of course takes up the entire horizontal space on the page but I cannot figure out how to set the padding to auto and just center the table in the div
Can anybody help me with this?