回答:
それは良い解決策ではありませんが、次のように試してください:
<table>
<tr>
<td>
<div>Lorem</div>
</td>
</tr>
<tr>
<td>
<div>Ipsum</div>
</td>
</tr>
</table>
divをmin-heightに設定します。
div {
min-height: 300px;
}
これがあなたが望むものであることを願っています...
heightのtdような作品のためにmin-height:
td {
height: 100px;
}
の代わりに
td {
min-height: 100px;
}
コンテンツが収まらない場合、表のセルは大きくなります。
heightで、td実際のの設定がpadding上部と下部として処理されることがわかりましたheight。開発ツールではスタイルまたは計算されたスタイルとしては表示されませんが、検査されたhtml要素の上にマウスを置くと、画面に表示されます。
min-heightではないheight@frankは、それがために同じ動作をしますの下に説明しているようしかしtable td。だから多分これは少し良い説明が必要です。
なしの解法divは、の::after最初のtd行のような疑似要素を使用しmin-heightます。HTMLをきれいに保存します。
table tr td:first-child::after {
content: "";
display: inline-block;
vertical-align: top;
min-height: 60px;
}
CSS 2.1では、テーブル、インラインテーブル、テーブルセル、テーブル行、および行グループに対する「min-height」および「max-height」の影響は定義されていません。
したがって、コンテンツをdivでラップして、divにmin-height
jsFiddleをここで指定してください
<table cellspacing="0" cellpadding="0" border="0" style="width:300px">
<tbody>
<tr>
<td>
<div style="min-height: 100px; background-color: #ccc">
Hello World !
</div>
</td>
<td>
<div style="min-height: 100px; background-color: #f00">
Goog MOrning !
</div>
</td>
</tr>
</tbody>
</table>
テーブル行のセルの1つにmin-heightのcssエントリを使用するだけです。古いブラウザでも動作します。
.rowNumberColumn {
background-color: #e6e6e6;
min-height: 22;
}
<table width="100%" cellspacing="0" class="htmlgrid-table">
<tr id="tr_0">
<td width="3%" align="center" class="readOnlyCell rowNumberColumn">1</td>
<td align="left" width="40%" id="td_0_0" class="readOnlyCell gContentSection">411978430-Intimate:Ruby:Small</td>