CSS how to make <TD> a fixed height?

you're missing table rows


<table  cellspacing="0" id="contactTable" style="table-layout:fixed; width:100%; font-weight:normal; position: absolute; top:45; left: 0;">
    <tr>
        <td style="padding-left:5px; overflow:hidden; height: 50px;">
            <span style="text-transform:capitalize;line-height:100%;">
               //names here
            </span>                          
        </td>
    </tr>
</table>

The best solution is to put a div inside the cell with the height:

<td style="padding-left:5px;">
  <div style="height: 50px; overflow:hidden;">
      ...
  </div>
</td>

BTW, what is the span for? If you only need it for styling, you can style the cell directly instead.


The CSS property you are looking for is line-height. You simply have to put it in the <td>, not in the contained <span>

<td style="padding-left:5px; line-height: 50px; overflow: hidden">
</td>

Tags:

Html

Css