首页 > 解决方案 > 为什么我的页脚不在底部

问题描述

我不明白为什么我的页脚略高于网页底部而不是直接位于底部

当前页脚

h6 {
  font-family: Neue Haas Grotesk, sans-serif;
  font-weight: 300;
  font-size: 1.4vw;
  color: white;
  position: relative;
  display: block;
}

.footer {
  position: relative;
  display: inline;
  bottom: 0;
  width: 100%;
  height: 100%;
  margin-bottom: 0;
  padding: 0;
}
<div class="footer">
  <h6>&copy; Alex Burger. All rights reserved<br>Further information can be requested through email.</h6>
</div>

标签: htmlcss

解决方案


<h6>标签具有原生边距。因此,您的问题将通过以下方式解决:

.footer h6 {
  margin-bottom: 10px;
}

请注意,设置margin: 0px没有您期望的结果,这只能通过更改文档的其他部分来解决。


推荐阅读