html - CSS how to make <TD> a fixed height? -


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

this doesn't work. overflow still making cell taller, height addapting content.

the best solution put div inside cell height:

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

btw, span for? if need styling, can style cell directly instead.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -