When specifying a style like this:
<style>
#ctrtable{width: 600px; margin-left: auto; margin-right: auto;}
</style>
You can apply the style as follows:
<table id="ctrtable">
<tr>
<td>something</td>
</tr>
</table>
If you define the style in this manner:
<style>
.ctrtable {width: 600px; margin-left: auto; margin-right: auto;}
</style>
You can then use it like this:
<table class="ctrtable">
<tr>
<td>something</td>
</tr>
</table>
Give this example a try:
<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style>
.cntrtable{text-align: center;}
</style>
</head>
<body>
<table style="width: 100%;">
<tr>
<td><table class="cntrtable" style="width: 50%; margin-left: auto; margin-right: auto; background-color: #FF0000;"><tr><td>table-1</td></tr></table></td>
</tr><tr>
<td><table class="cntrtable" style="width: 50%; margin-left: auto; margin-right: auto; background-color: #00FF00;"><tr><td>table-2</td></tr></table></td>
</tr><tr>
<td><table class="cntrtable" style="width: 50%; margin-left: auto; margin-right: auto; background-color: #0000FF;"><tr><td>table-3</td></tr></table></td>
</tr><tr>
<td><table class="cntrtable" style="width: 50%; margin-left: auto; margin-right: auto; background-color: #FF00FF;"><tr><td>table-4</td></tr></table></td>
</tr>
</table>
</body>
</html>