Hi Acauchi,
Cool just add one div tag with your table and make div tag margin auto it will get your
table center align.
Like this:
<div style="margin:auto;">
<table>
<tr>Test</tr>
<tr>Test</tr>
</table>
</div>
-
This reply was modified 7 years, 6 months ago by Anil Jadhav.
Dear Anil,
unfortunately it did not work
Once I put the table encapsulated in the div tag and went from text view to visual and back to text view the following happened to the code
<div style="margin: auto;">TestTest</div>
It was all truncated.
Below is the code I modified and table looks centered but the images still cannot come centred as you can here http://www.digitalmalta.com/digitalmaltaw/
Any ideas??
CODE USED:
le style="text-align: center;" border="1" width="80%" cellpadding="5">
<tbody>
<tr>
<td width="75" align="center" >
[caption id="attachment_99" align="alignnone" width="300"]<img class="size-medium wp-image-99" src="http://www.digitalmalta.com/digitalmaltaw/wp-content/uploads/2016/10/placeholder-300x200.png" alt="placeholder" width="300" height="200" /> image1[/caption]</td>
<td align="center" >
[caption id="attachment_99" align="alignnone" width="300"]<img class="size-medium wp-image-99" src="http://www.digitalmalta.com/digitalmaltaw/wp-content/uploads/2016/10/placeholder-300x200.png" alt="placeholder" width="300" height="200" /> Image 2[/caption]</td>
</tr>
<tr>
<td align="center" >
[caption id="attachment_99" align="alignnone" width="300"]<img class="size-medium wp-image-99" src="http://www.digitalmalta.com/digitalmaltaw/wp-content/uploads/2016/10/placeholder-300x200.png" alt="placeholder" width="300" height="200" /> Image 3[/caption]</td>
<td align="center" >
[caption id="attachment_99" align="alignnone" width="300"]<img class="size-medium wp-image-99" src="http://www.digitalmalta.com/digitalmaltaw/wp-content/uploads/2016/10/placeholder-300x200.png" alt="placeholder" width="300" height="200" /> Image 4[/caption]</td>
</tr>
</tbody>
</table>
Issue solved. Removed the caption id and also included center tabling via custom css using Simple CSS Plugin
code included
html, body, #wrapper {
height:100%;
width: 100%;
margin: 0;
padding: 0;
}
#wrapper td {
vertical-align: middle;
text-align: center;
}