我想在一行中制作3个div。左,中,右。 左边和中间必须有固定大小(例如300像素),中间必须动态调整大小(百分比)。这里是我的CSS:3 divs和中间宽度
#content
{
width: 100%;
height: 435px;
}
#content_left
{
float: left;
width: 300px;
height: 345px;
border: 1px solid red;
}
#content_middle
{
margin-left: 300px;
margin-right: 300px;
width: 100%;
height: 345px;
border: 1px solid green;
}
#content_right
{
float: right;
width: 300px;
height: 345px;
border: 1px solid red;
}
#wrap
{
maring: 0 auto;
clear: both;
width: 100%;
margin-left: auto;
margin-right: auto;
min-width: 1020px;
}
这里是我的html:
<div id="wrap">
<div id="content">
<div id="content_right"></div>
<div id="content_left"><div>
<div id="content_middle">
</div>
</div>
</div>
alt text http://img509.imageshack.us/img509/8940/capturewj.png
我怎样才能让我的绿色div来填补其他2周的div之间的所有尺寸?
请在Doctype.com上提出这个问题,而不是每个Stackoverflow.com的常见问题。 – 2010-01-13 15:37:05