![](/img/trans.png)
[英]visiblity:hidden of table-cell hides background-color of parent table-row
[英]Internet Explorer: Bad visualization of CSS Table (table-row, table-cell)
我使用顯示表,表行和表單元格屬性制作了CSS表結構。
每個p具有table-row屬性,它們跳行OK。 但是,當我在同一個<p>
放置2個或更多元素(輸入或選擇)時,我希望這些元素是內聯的,但在IE(最新版本)中,盡管屬於相同的<p>
有解決此問題的解決方案嗎? 完美的可視化效果就像Firefox,所有元素都對齊。
<p><label>Name (first, second): </label><input type="text" /><input type="text" /></p>
示例: http : //jsfiddle.net/HY62t/
在labels
添加vertical-align: top
(和padding-top
)或middle
。
如果在單獨的行上有兩個輸入,則zou可以使用例如fieldset input {float: left;}
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.