CSS question with cake.generic.css: Can't decrease the width of a table inside a division
I have two division with float: left;
div#loadwhat {
float: left;
width: 78%;
padding-right: 5px;
}
div#id_div_rightside {
float: left;
width: 20%;
height: 100%;
border-left:solid thin #ff9900;
}
But the table inside loadwhat division is much wider than the loadwhat division. Why is that ?
开发者_StackOverflowI want to decrease the width of table. I tried to set width: xx for table but it didn't work.
In cake.generic.css
table {
background: #fff;
border-right:0;
clear: both;
color: #333;
margin-bottom: 10px;
width: 100%;
}
How can i solve this problem ?
Perhaps try removing the table width and add table-layout:fixed;
. This may even out the rows in many browsers. Here is more detail: http://reference.sitepoint.com/css/table-layout
精彩评论