【发布时间】:2016-03-06 17:23:03
【问题描述】:
我创建了一个 JSFiddle,其中显示了 6 个按钮和每个内部的文本。我想要完成的是弄清楚为什么在 Chrome 上它看起来很好,其中所有按钮都将匹配最大按钮的大小(文本最多的那个),而在其他浏览器上,按钮不匹配: http://jsfiddle.net/tXS6w/432/
<table class=buttons>
<tr>
<td><button type="button">Hello there my name is bob and this is a test </button>
<td><button type="button">B</button>
<td><button type="button">C</button>
<td><button type="button">D</button>
<td><button type="button">E</button>
<td><button type="button">F</button>
</table>
css
.buttons {
width: 100%;
table-layout: fixed;
}
.buttons button {
width: 100%;
height: 100%;
white-space: normal;
}
【问题讨论】:
标签: javascript html css