Luis A. Borit Guitton Luis A. Borit Guitton - 2 months ago 5
CSS Question

how to style this table inside a table

i have a table formated like this:

<table>
<tr>
<td>
<table>
<tr>
<td>
{{pca.SNP_c}}
</td>
</tr>
</table>
</td>
</tr>
</table>


And i've been trying to style the table inside, but this is my css:

td {
border: 0.5px dashed black;
width: 150px;
}

body {
font-size: 10px;
text-align: center;
}


enter image description here

Answer

If you only want to style the table that is nested inside another table you need to adjust your selector.

td table td {
    border: 0.5px dashed black;
    width: 150px;
}

body {
    font-size: 10px;
    text-align: center;
}
Comments