【发布时间】:2015-10-14 05:29:58
【问题描述】:
大家好,感谢即将到来的支持我如何设置蓝色来填充整个 maininfo div 的剩余宽度?我尝试设置 width:auto
<div class="maininfo">
<div class="large">2</div>
<div class="smallblock">
<div class="smalltop">3</div>
<div class="small">4</div>
</div>
<div class="smallblock">
<div class="smalltop">5</div>
<div class="small">6</div>
</div>
</div>
.maininfo {
width: 600px;
}
.large {
float: left;
height: 95px;
background-color: blue;
width:auto;
}
.smallblock {
float: right;
height: 90px;
margin: 0 0 0 5px;
width: 20%;
}
.small {
background-color: red;
height: 50%;
width: 100%;
}
.smalltop {
background-color: red;
height: 50%;
width: 100%;
margin-bottom:5px;
}
更新了我的 JFIDDLE,但现在它变成了 2 行:http://jsfiddle.net/4ykf5frk/11/
【问题讨论】:
-
我的意思是整个,我很抱歉并会修复它。