如何將我的div浮動在我的內容的最底部? 所以在我的頁面結束時沒有多長時間(由內容生成)我想要某種頁腳,但我不想使用頁腳標籤,我需要在其他頁面中實現aswel 。如何在我的內容的最底部浮動我的div
在這種情況下,它是關於分割類= 「底部」
我的代碼是下面
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=yes">
<title>Moworkflow app</title>
<link rel="stylesheet" type="text/css" href="advertentie.css" />
<head>
<body>
<!-- wrapper -->
<div id="wrapper">
<!-- header -->
<div id="header" align="center">
<ul>
<li><a href="#">img logo</a></li>
<li><a href="#">Aanbod</a></li>
<li><a href="#">Vraag</a></li>
</ul>
</div>
<!-- filter -->
<div id="filter">
</div>
<!-- content -->
<div id="content" align="center">
<table cellspacing="10" class="tablestyle">
<tr>
<td><h3>Advertentiegegevens</h3></td>
</tr>
<tr>
<td>Soortnaam</td>
</tr>
<tr>
<td><input type="text" class="invoerveld"></td>
</tr>
<tr>
<td>Kleur</td>
</tr>
<tr>
<td><input type="text" class="invoerveld"></td>
</tr>
<tr>
<td>Aantal</td>
</tr>
<tr>
<td><input type="text" class="invoerveld"></td>
</tr>
<tr>
<td>Prijs</td>
</tr>
<tr>
<td><input type="text" class="invoerveld"></td>
</tr>
</table>
</div>
<!-- bottom -->
<div id="bottom" align="center">
</div>
</body>
</html>
body {
margin:0;
width:100vw;
background:#fff;
font-family: arial;
}
#wrapper {
position: absolute;
height: 100%;
min-height: 456px;
width: 100%;
}
#header {
position: fixed;
width: 100%;
height: 60px;
background: #0d82d7;
z-index: 4;
opacity: 0.96;
}
ul {
display: table;
width: 100%;
height: 60px;
list-style: none;
padding-left:0;
margin:0;
}
li {
display: table-cell;
text-align: center;
line-height: 60px;
text-decoration: none;
border-right: 1px solid #0d82d7;
}
li a {
text-decoration: none;
color: white;
}
#filter {
background: #0873c0;
position: fixed;
top: 60px;
width: 100%;
height: 30px;
z-index: 3;
opacity: 0.96;
}
#content {
position: absolute;
background-color: white;
width: 100%;
top: 70px;
margin-top: 20px;
bottom: 30px;
display: table;
z-index: 0;
}
.tablestyle {
width: 100%;
padding: 5px;
padding-left: 50px;
padding-right: 50px;
}
.invoerveld {
width: 100%;
height: 30px;
border-radius: 5px;
border-color: #0d82d7;
border-style: solid;
border-width: 1px;
margin-bottom: 10px;
}
#bottom {
position: relative;
width: 100%;
background-color: #0d82d7;
height: 30px;
bottom: 0px;
margin-bottom: 0px;
opacity: 0.9;
}
這只是固定的,我不希望它是可見的所有時間需要浮動下面的內容。 – 2014-09-29 11:53:06
OP請求頁腳在內容下面浮動無論多長時間,在您的解決方案中,頁腳無論內容高度如何都會卡在頁面的底部......如果它更長> http://jsfiddle.net/ew6xyp66/1/ – webkit 2014-09-29 11:53:18
@KevinAmmerlaan是你想要的嗎? http://jsfiddle.net/ew6xyp66/2/ – DeDevelopers 2014-09-29 11:57:14