Setting table row height
I have this code:
<table class="topics" >
<tr>
<td style="white-space: nowrap; padding: 0 5px 0 0; color:#3A5572; font-weight: bold;">Test</td>
<td style="padding: 0 4px 0 0;">1.0</td>
<td>abc</td>
</tr>
<tr>
<td style="white-space: nowrap; padding: 0 5px 0 0; color:#3A5572; font-weight: bold;">test2</td>
<td style="padding: 0 4px 0 0;">1.3</td>
<td>def</td>
</tr>
</table>
The rows are spaced too far apart. I want the lines closer together.
What I did was to add the following CSS but it doesn't seem to change anything.
.topics tr { height: 14px; }
What am I doing wrong?
try this:
.topics tr { line-height: 14px; }
try setting the attribute for td
so:
.topic td{ height: 14px };