gpt4 book ai didi

css - 如何将我的 div float 在我的内容的最底部

转载 作者:行者123 更新时间:2023-11-28 09:20:53 24 4
gpt4 key购买 nike

如何让我的 div float 在内容的最底部?所以在我的页面末尾,无论它有多长(由内容生成)我想要某种页脚,但我不想使用页脚标签,我需要在其他页面中实现它。

在这种情况下,它是关于部门 class="bottom"

我的代码如下

    <!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;
}

最佳答案

用这个更改底部 ID css:

#bottom {
position: fixed;
width: 100%;
background-color: #0d82d7;
height: 30px;
margin-bottom: 0px;
opacity: 0.9;
bottom:0;
}

同时检查 jsfiddle,你是否希望它像这样?

http://jsfiddle.net/ew6xyp66/

关于css - 如何将我的 div float 在我的内容的最底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26099087/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com