左側にボーダーがあるテーブルセルを持つCSSテーブルが必要です(fiddle参照)。これは絶対的な位置付けによって動作し、Chromeの上下の値を使用します。 しかし、IE11(と私が推測するより古い)で、国境は全く示されていません。これを達成するための最良の解決策は何ですか?それはすべてのブラウザ(IE9まで)で動作しますか? https://jsfiddle.net/jhparj52/7/IE11のtable-cellの上下にパディングボーダーがあります
HTML:
<div class="the-table">
<div class="cell-containing-border">
<div class="the-border"></div>
<div>
</div>
</div>
<div class="cell-not-containing-border"></div>
</div>
CSS:
.the-table {
display: table;
height: 80px;
background-color: red;
width: 80px;
}
.cell-containing-border {
display:table-cell;
position: relative;
}
.the-border {
top: 10px;
bottom: 10px;
position: absolute;
border-left: 4px solid black;
}
.cell-not-containing-border {
display: table-cell;
height: 40px;
}
それはトップ/ボトム10pxのために行いますので、これは、垂直方向に真ん中に境界線を合わせていないようです。 – Mike
それは明示的に高さを設定するのと同じでしょうか? – Mike