I'm using BlueGriffon and reading the following links:
about how to center a table using CSS, as align
has been deprecated. However, none of them are working, the code suggested in the 3 links to center a table looks like this:
.centered-table {
margin-left: auto;
margin-right: auto%;
}
My code:
CSS:
.maintbl {
margin-left: auto;
margin-right: auto%;
}
HTML:
<table class="maintbl" id="tblMain">
<tbody>
<tr>
<td>Hello world<br>
</td>
</tr>
</tbody>
</table>
Instead of centering, it appears on the right side. I copied the code from the last link directly into the editor, and the result was the same. What wrong and how do I fix it?