在下面中間一行粉色盒子溢出給定的HTML標記框和其下方的灰色盒子。我怎樣才能確保灰箱始終保持粉紅色的箱子。而且,這裏是鏈接到HTML頁面:http://pastehtml.com/view/axc3iain8.html避免溢出的盒子下面
<html>
<head>
<title>Page 3</title>
<style type="text/css">
body {
width: 1000px;
margin-left: auto;
margin-right: auto;
}
#header {
height: 200px;
margin: 2px;
margin-bottom: 10px;
font-family: Arial,Helvetica,sans-serif;
font-size: XX-large;
background: gray;
}
.snip_list {
min-height: 100px;
margin: 25px auto;
}
.snippet {
width: 323px;
float: left;
margin: 5px;
font-size: small;
background: lightpink;
display: inline;
}
#para_middle {
margin-top: 10px;
background: gray;
}
</style>
</head>
<body>
<div id="header">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
<div class="snip_list">
<div class="snippet">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
<div class="snippet">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
<div class="snippet">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
</div>
<div id="para_middle" class="para">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.</p>
</div>
<div class="snip_list">
<div class="snippet">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
<div class="snippet">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
<div class="snippet">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
</div>
</div>
</body>
</html>
我也嘗試刪除「display:inline;」從.snippet,但也沒有工作。 – Xolve 2011-06-16 14:32:25