2016-05-10 4 views
0

テーブルの行の高さを24ピクセルに調整します。私は上のCSSに行の高さを入れ、インラインで書くことを試みました。ブートストラップテーブルの行の高さを調整できません

CSS:

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

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

HTML:http://www.w3schools.com/tags/att_table_cellpadding.asp

<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 

答えて

0

参考のために、この例を参照してください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> 

のCELLPADDINGと、このようなdivの中にあなたのテーブルの内容をラップ

+0

w divをheres? – user176105

関連する問題