Reputation: 431
how do you center align a table in the middle of the page using css. This is what I have http://jsfiddle.net/m5uEr/
<div style="text-align: center; border-style:solid;">
<table style="border-style:solid;">
<tr>
<td>test</td>
</tr>
</table>
</div>
Upvotes: 0
Views: 129
Reputation: 555
Did you put margin-left:auto, margin-right:auto in the properties of the div?
That is easy to do.
Those properties should belong in table
<div style="text-align: center; border-style:solid;">
<table style="border-style:solid; margin-left:auto; margin-right:auto; ">
<tr>
<td>tdddest</td>
</tr>
</table>
</div>
Upvotes: 1
Reputation: 431
css wasn't working so I did a <table align="center">
this is on IE8
Upvotes: 1