我有两个带 float 的分区:左;
div#loadwhat {
float: left;
width: 78%;
padding-right: 5px;
}
div#id_div_rightside {
float: left;
width: 20%;
height: 100%;
border-left:solid thin #ff9900;
}
但是loadwhat分区里面的table要比loadwhat分区宽很多。这是为什么?
我想减少表格的宽度。我尝试为表格设置 width: xx 但它不起作用。
在 cake.generic.css 中
table {
background: #fff;
border-right:0;
clear: both;
color: #333;
margin-bottom: 10px;
width: 100%;
}
我该如何解决这个问题?
最佳答案
也许尝试删除表格宽度并添加 table-layout:fixed;
。这可能会使许多浏览器中的行变平。这里有更多细节:http://reference.sitepoint.com/css/table-layout
关于html - cake.generic.css : Can't decrease the width of a table inside a division 的 CSS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7575691/