I'm trying to design HTML emails and therefore getting a better grip around HTML tables.
I'm currently trying to create a layout with two nested tables that should be inline. The container is 600px
and the nested tables are 300px
each. When reducing the width of the nested tables to 290px
, the inlining works but I'd like to have it pixel perfect.
I tried to get rid of all the borders but I'm suspecting there is still a border attribute somewhere making the container smaller or the elements bigger than their specified width.
I'd love some help.
body {
max-width: 600px;
}
table {
border-spacing: 0;
border-collapse: collapse;
background: blue;
border: none;
}
.column {
display: inline-block;
width: 100%;
max-width: 300px;
background: red;
}
<table width="100%" class="frame">
<tr>
<td>
<table class="column">
<tr>
<td>
Content I
</td>
</tr>
</table>
<table class="column">
<tr>
<td>
Content II
</td>
</tr>
</table>
</td>
</tr>
</table>