css宽度和最小宽度

时间:2012-04-27 10:05:06

标签: css

我将以下样式应用于表

width: auto;
min-width: 98.5%;

当我查看chrome浏览器时,div内的表似乎只有大约50%的包含div的宽度。在IE9中,表占据整个宽度。在Chrome中,当我看到使用F12应用的样式时,两种样式都会应用而不会被交叉。

.containing > table {
position: relative;
left: 0;
margin-right: 0;
top: 0;
border: 1px solid #DDD;
width: auto;
min-width: 98.5%;
margin-bottom: 1em;
-webkit-border-bottom-right-radius: 8px;
-webkit-border-bottom-left-radius: 8px;
-moz-border-radius-bottomright: 8px;
-moz-border-radius-bottomleft: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
}

html:

<div class="containing">
<table>

</table>
</div>

1 个答案:

答案 0 :(得分:1)

嘿我应该定义边框半径,如果你想要边框

,请不要在表格中定义

我认为您可以在div中定义边框和边框半径

检查住前。 http://jsfiddle.net/RfWWh/

并根据您的设计进行调整..

相关问题