【发布时间】:2015-10-07 16:56:41
【问题描述】:
我想让一个选择(下拉列表)元素填充 100% 的表格单元格高度。我能够让它在 Firefox 和 Chrome 中运行,但不能在 IE (Internet Explorer) 上运行。
测试 HTML:
<table>
<tr>
<td>
Some cell content<br/>
Some cell content<br/>
Some cell content<br/>
</td>
<td>
<select>
<option>Select</option>
</select>
</td>
</tr>
</table>
测试 CSS:
table {width:400px;border:solid 1px #000000;border-collapse:collapse;height:100%}
table td {border:solid 1px #000000;height:100%}
select {width:100%;height:100%;}
Here's the fiddle(适用于 Firefox 和 Chrome,但不适用于 IE)
【问题讨论】:
标签: html css internet-explorer