gpt4 book ai didi

html - 页脚在底部?

转载 作者:行者123 更新时间:2023-11-28 08:50:35 24 4
gpt4 key购买 nike

我希望页脚位于页面底部。现在,它在顶部...我已经发布了我的 html 和我所有的 css,所以你可以看到。我认为这样做可能更容易?我试图添加将主体拉伸(stretch)到底部的容器,但它会与页面上的其他容器混淆并使它们掉落到顶部。我需要快速回答,因为这将在一周内到期!

* {
margin:0;
padding:0;
}
body {
font-family:Arial;
background:#fff url(images/bg1.png) repeat;
background-size: 700px;
height: 100%;
min-height: 100%;
}
.title {
width:548px;
height:119px;
position:absolute;
background:transparent url(title.png) no-repeat top left;
}
#content {
margin:0 auto;
}
#horizon {
text-align: center;
position: absolute;
top: 50%;
left: 0px;
width: 100%;
overflow: visible;
visibility: visible;
display: block;
}
#stuff {
font-family: Verdana, Geneva, Arial, sans-serif;
background-color: #fff;
opacity: 0.6;
margin-left: -500px;
position: absolute;
top: -125px;
left: 50%;
width: 1000px;
height: 250px;
visibility: visible;
overflow: scroll;
padding: 10px;
border: 5px dotted #F3DECD;
text-align: center;
}
footer {
}
<body> 

<div id="content">
<div class="title"></div>

<div class="navigation" id="nav">
<div class="item user">
<img src="images/bg_user.png" alt="" width="199" height="199" class="circle"/>
<a href="#" class="icon"></a>
<h2>Home</h2>
<ul>
<li><a href="aboutshop.html">About the Shop</a></li>
<li><a href="aboutartist.html">About the Artist</a></li>
</ul>
</div>
<div class="item home">
<img src="images/bg_home.png" alt="" width="199" height="199" class="circle"/>
<a href="#" class="icon"></a>
<h2>How-To's</h2>
<ul>
<li><a href="howtojewelry.html">Jewelry</a></li>
<li><a href="howtoclay.html">Clay</a></li>
</ul>
</div>
<div class="item shop">
<img src="images/bg_shop.png" alt="" width="199" height="199" class="circle"/>
<a href="#" class="icon"></a>
<h2>Portfolio</h2>
<ul>
<li><a href="jewelry.html">Jewelry</a></li>
<li><a href="clay.html">Clay</a></li>
<li><a href="digital.html">Digital</a></li>
</ul>
</div>
<div class="item camera">
<img src="images/bg_camera.png" alt="" width="199" height="199" class="circle"/>
<a href="#" class="icon"></a>
<h2>Contact</h2>
<ul>
<li><a href="contact.html">Questions</a></li>
<li><a href="suggestions.html">Suggestions</a></li>
</ul>
</div>
</div>
</div>

<div id="horizon">
<div id="stuff">
<h2> Welcome! </h2><br>
<p>This is a page that I have created for all my jewelry. This will be updated with new information periodically.</p>
</div>
</div>
<footer>

<a href="">
<img height="32" width="32" alt="'s Deviantart" src="deviantart.png">
</a> &nbsp;&nbsp;&nbsp;
<a href="">
<img height="32" width="32" alt="'s Think Jewelry Page" src="facebook.png">
</a>

</footer>

最佳答案

您可以简单地设置一个绝对位置的 div。它看起来像这样:

html:

<div id='footer'></div>

CSS:

#footer{
height:45px;
width:100%;
background-color:grey;
position:absolute;
bottom:0;
}

关于html - 页脚在底部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27370890/

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