Jan 24, 2022 8:54 AM
I'm trying to build a table for email purposes and am looking to adjust the border color of the table. What tags would I need to add to do this?
Jan 31, 2022 8:57 AM
Hi @GWalsh ,
To collapse the border use table {
border-collapse:collapse !important;
}
or to use for specific row give id="#headerTable" to that row and give style #headerTable {
border-collapse: separate !important;
}
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.
Jan 26, 2022 4:31 PM
Thank you so much Anton! For a table with no border, but an underlined header, would the best way to do that be
<TABLE BORDER="bottom" bordercolor="#ff0000" style="border:1px bottom #ff0000" >
Jan 27, 2022 6:43 AM
Hi @GWalsh,
I would recommend to do it like this:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th scope="col" style="border-bottom:1px solid #ff0000">header 1</th>
<th scope="col" style="border-bottom:1px solid #ff0000">header 2</th>
<th scope="col" style="border-bottom:1px solid #ff0000">header 3</th>
</tr>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
</tbody>
</table>
best,
Anton
Jan 27, 2022 9:19 AM
Is there a way to collapse the border of the header, so it appears as a single line? The cell padding is currently set to 12 to properly space the table. Thanks!
Jan 24, 2022 9:29 AM
Thank you Anton! And to specifically align some cells, would that be:
<TR>
<TD>Content</TD>
<TD> align - center
Content
</TD>
</TR>
Jan 24, 2022 9:38 AM
this will do it's job:
...
<tr>
<td align="center" style="text-align:center"> {# if you want to align it verticaly centered add 'valign="middle"' without the single-quotes to it #}
Your Content
</td>
</tr>
...
best,
Anton
Jan 24, 2022 9:13 AM
Hi @GWalsh,
for best possible email client support I would suggest to do it like this for specific table cells:
<table>
...
<tr>
<td border="1" bordercolor="#ff0000" style="border: 1px solid #ff0000;....">
Your Content
</td>
</tr>
...
</table>
and like this for the whole table:
<table border="1" bordercolor="#ff0000" style="border:1px solid #ff0000">
...
<tr>
<td>
Your Content
</td>
</tr>
...
</table>
best,
Anton