I have a table, and in the left column I want to add an indicator for the row. I'm using a span to render the indicator, but I can't get the span to take up the full height:
<table>
<tr>
<td style="padding:0px;"><span style="height:100%; width:5px; background-color:pink;"> </span></td>
<td>Some content</td>
<td>Some more content</td>
</tr>
</table>
The table has a padding of 15px, so for the indicator col I remove the padding, and set the span to height:100%:
td {padding:15px;}
table {background-color: yellow;}
This fiddle shows it currently running - that pink bar needs to span the whole height of the containing td.
How do I do this? Note that I can't set the styling on the td instead of the span because that causes other issues with the rendering (it offsets the border-bottom
of the th
rows if I do that).