<div class="story-container">
<div class="story-box">
<h3>News Item #2</h3>
<h2>This is my second news item!!</h2>
</div>
<div class="story-box">
<h3>Technical Development</h3>
<h2>See Muppets on Your Band-Aid With New AR App</h2>
</div>
<div class="clear"></div>
</div>
我的CSS是:我怎样才能浮动divs,以便它们扩展通过它们的容器?
.story-container {
background: none repeat scroll 0 0 blue;
margin: 0 auto;
width: 1000px;
}
.story-box {
float: left;
margin-right: 10px;
}
我想story-box
的是相邻的外,但目前他们没有这样做。我怎样才能做到这一点?
编辑
我想story-box
是1000像素为应容器。这样,story-box
占用了容器的整个宽度,然后下一个在技术上处于界限之外。
他们旁边看对方我:http://jsfiddle.net/39uR8/ –
编辑我的问题,以反映我真正的设计re – Shamoon