我在 div 中有一个表格,div 宽度为 100%,表格宽度为 200%,自动溢出。现在的正常行为是:显示表格时,用户必须向右滚动才能看到所有表格列。
如果我想为表类 white-space:nowrap;
设置 div 将占用更大的宽度,这会破坏我的表单。
table.grid tr th {
border-right: 1px solid #FFFFFF;
white-space: nowrap;
}
添加 white-space:nowrap
之前的示例:
http://tabletest.orgfree.com/
添加 white-space:nowrap
后的示例:
http://s7.postimage.org/6rw2idlmj/test.png
最佳答案
td.offersContent {
border: 1px solid #EAEAEA;
border-radius: 7px 7px 7px 7px;
margin-bottom: 10px;
padding: 0 10px;
width: 83pc;
*position: absolute;
display: block;*
}
这将解决您的问题。
关于html - 空白 :nowrap; issue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9360376/