我有一个两行三列的表。右边的两个单元格的宽度比左边的两个小。为什么会这样呢?两者的内容是相同的。寻求帮助。
<div id="tableContain">
<div id="tabRow1">
<div id="tabCell">The gibberish (nonsense text) presented here </div>
<div id="tabCell"> <img src="images/Flora/tree-of-life.jpg" /> </div>
<div id="tabCell">The gibberish (nonsense text) presented here </div>
</div>
<div id="tabRow2">
<div id="tabCell">The gibberish (nonsense text) presented here </div>
<div id="tabCell"> <img src="images/Flora/tree-of-life.jpg" /> </div>
<div id="tabCell">The gibberish (nonsense text) presented here </div>
</div>
</div>
#tableContain {
display: table;
width: 600px;
margin: auto;
border-spacing: 10px;
}
#tabRow1, #tabRow2 {
display: table-row;
}
#tabCell {
display: table-cell;
border: 2px solid gray;
padding: 10px;
border-collapse: collapse;
}
img {
width: 200px;
}发布于 2014-12-02 10:20:12
试试这个。
#tabRow1, #tabRow2 {
display: table-row;
width: 600px;}https://stackoverflow.com/questions/27240759
复制相似问题