Remove the spacing in the TD element that contains the list
I would like to remove the padding present in the first row of the table, so it has the same height as the second row. I'm not sure where the padding is coming from as I have set padding to zero on the td
ul
and elements li
.
<table>
<tr>
<td><ul><li>abc</li><li>def</li></ul></td>
<td>this row is too wide</td>
</tr>
<tr>
<td></td>
<td>this row is just right</td>
</tr>
</table>
And the css:
ul li { display: inline; margin: 0; padding: 0; }
table { border-collapse: collapse; border: 1px solid black; }
td { padding: 0px; border: 1px solid black; }
+3
source to share