我有这个例子: Fiddle link
使用 display: table, display: table-cell, display: table-row 的表格
我需要在
之前添加一个 标记,但是我的表结构中断。
有什么想法吗?谢谢
例子:
<fieldset>
<span>
<p>
<label>First Name: </label>
<input type="text" />
</p>
</span>
<span>
<p>
<label>Second Name: </label>
<input type="text" />
</p>
</span>
<span>
<p>
<label>Country: </label>
<select>
<option>Choose</option>
</select>
</p>
</span>
<span>
<p>
<label>Age: </label>
<select>
<option>Choose</option>
</select>
</p>
</span>
</fieldset>
最佳答案
如果您要显示为表格,那么所有元素都应遵循相同的结构属性
fieldset span {
display: table-row-group;
}
fiddle :http://jsfiddle.net/qQ3xJ/
关于html - CSS 显示表 + SPAN 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18487518/