marduc812 marduc812 - 2 months ago 8
HTML Question

CSS Remove table's border

I have a Wordpress Template installed so the table takes the style that was given. I managed to change tables color for background and text but I couldn't remove the frame around the table (border). I found a lot of related results but I couldn't find something that worked for me (I'm not that much experienced with CSS).



body {
background: #040404;
}

table.photos_table td {
background-color: #040404 !important;
color: white !important;
}
table.photos_table {
border: none !important;
border-collapse: collapse !important;
}

<table class="photos_table">
<tbody>
<tr>
<td>food</td>
<td>drink</td>
</tr>
<tr>
<td>pizza</td>
<td>soda</td>
</tr>
</tbody>
</table>





This is what I get as a result.

Border is still visible

Any suggestions what could be wrong? Do I need an other option?

Answer

The border is in the <tbody>, so giving:

table thead, table tbody, table tfoot {border: none;}

Works...

preview

Comments