2016-05-10 3 views
0

Ich möchte die Höhe der Tabellenzeilen auf 24px einstellen. Ich habe versucht, die Zeilenhöhe im oberen CSS zu setzen und es inline zu schreiben.Bootstrap-Tabellenzeilenhöhe kann nicht angepasst werden

CSS:

tbody tr { 
line-height: 24px; 
height: 24px; 
padding: 0; 
} 

tbody td { 
line-height: 24px; 
height: 24px; 
padding: 0; 
} 

HTML:

<thead id='dontMove'> 
<tr id='theRow'> 
<th>Rank</th><th>Applicants</th><th># Enrolled</th> 
</tr> 
</thead> 
<tbody style='font-size: 12px;'> 

<tr style='height: 24px;'><td style='height: 20px;'>Contents</td></tr> 

//then I close the table after it's contents 

Antwort

0

Wickeln Sie Ihren Tabelleninhalt in einem div wie dies mit einem cellpadding von 24

<table cellpadding="24"> 
    <thead id='dontMove'> 
     <tr id='theRow'> 
      <th>Rank</th> 
      <th>Applicants</th> 
      <th># Enrolled</th> 
     </tr> 
    </thead> 
    <tbody style='font-size: 12px;'> 
     <tr style='height: 24px;'> 
      <td style='height: 20px;'>Contents</td> 
     </tr> 
    </tbody> 
</table> 

Referenz dieses Beispiel Siehe: http://www.w3schools.com/tags/att_table_cellpadding.asp

+0

w Heres das div? – user176105

Verwandte Themen