0
How to make my table to center??
please help guru
4 Answers
+ 3
It's preferrable to use css to the parent instead of depreciated tag property. You could do it inline ( better way to separate ):
<div style="text-align:center;"><table></table></div>
Another way to horizontally center an element like a table, you can set its css margin property to "auto" ( left and right are suffisant ):
<table style="margin:auto;">
+ 2
<table align="center">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
+ 1
thanks :D
0
you can use align or position property to place the table center