我想伸展我的紅色content
cless從頁腳延伸到頁眉。我知道如果我填充它的內容,但我該如何讓它伸展?如何使用html/css將容器div從頁眉伸展到頁腳?
您可以克隆該項目here
相關代碼:
HTML:
<body>
<div class="wrapper">
<div class="header">
<div class="nav">
<div class="logo">
<strong>
<a href="index.html">
<img src="images/logo.png" alt="Sam Jarvis logo"/>
</a>
</strong>
</div>
<div class="menu">
<ul>
<li><a href="#home">HOME</a></li>
<li><a href="#about">ABOUT</a></li>
<li><a href="#work">PORTFOLIO</a></li>
<li><a href="#clients">CONTACT</a></li>
</ul>
</div>
</div>
</div>
<div class="content">
</div>
</div>
<div class="footer">
<div class="footercontent">
<p>© 2013 Friend | Design and Development. All Rights Reserved.</p>
</div>
</div>
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
</body>
CSS:
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -6.25em;
}
.header {
width: 100%;
height: 100px;
background-color: #000000;
margin: 0 auto;
font-family: 'Open Sans', sans-serif;
font-weight: 300;
}
.content {
width: 1000px;
border: 1px solid #ff0000;
margin: 0 auto;
height: 100%;
min-height: 100%;
}
邪惡的感謝。這工作。刪除了,並添加了「溢出;隱藏「,因此我可以添加數據並且不會混淆頁腳和內容的佈局。訣竅了。 – eveo