html - cake.generic.css : Can't decrease the width of a table inside a division 的 CSS 问题

标签 html css cakephp cakephp-1.3

我有两个带 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/

相关文章:

HTML:宽度为 100% 的子输入大于固定宽度的父表

java - Webview显示本地HTML页面

html - 将元素居中并向左对齐

html - 多行文本停留在底部?

cakephp - 使用 CakePHP 2.0 触发 404 错误?

cakephp - 如何在 cakePHP 3.x 中正确实现 ExpressCheckout?

html - 媒体查询未正确加载

javascript - 如何使用 js 控制 <select> 元素的默认行为?

javascript - 如何检测 textContent 何时溢出其父级

php - CakePHP 多条件 SQL 语句