html - 页脚重叠内容 - HTML 和 CSS

标签 html css layout css-position footer

我的 html 代码中的页脚与之前的内容重叠,这是它在浏览器中的样子:

footer overlapping content

它位于页脚语义标签之前的 div 中的图像之上。

    footer {
      position: relative;
    }
    
    #footerlinks {
      text-align: center;
    }
    
    #footerlinks li {
      list-style: none;
      display: inline-block;
    }
    
    #footerlinks a {
      text-decoration: none;
      color: #8e8e8e;
      font-family: 'Lato', sans-serif;
    }
          <!-- Reviews -->
      <section id="reviews">
        <h2>Reviews</h2>
        <section class="visitor-review-1">
          <h3>Placeholder text</h3>
        </section>
        <section class="visitor-review-2">
          <h3>Placeholder text<h3>
        </section>
      </section>

    </main>

    <!-- Footer -->
    <footer>
      <nav id="footerlinks">
        <ul>
          <li><a href="copyright.html">Copyright &#124;</a></li>
          <li><a href="accessibility.html"> Accessibility &#124;</a></li>
          <li><a href="subscribe.html"> Subscribe</a></li>
        </ul>
      </nav>
    </footer>

最佳答案

试着给页脚从上面的部分留出边距,比如 <footer style="margin-top:90px"> else 降低最后一个封闭分区的高度

关于html - 页脚重叠内容 - HTML 和 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44749099/

相关文章:

php - 获取登录信息 - 该代码如何工作?

html - 为什么边距顶部百分比使用高度以及如何解决它?

iOS 动画 UITabBarController 滑动; View 重叠状态栏 - 仅在第一次加载时

android - 在 TextView 中居中文本

javascript - ng-hide 元素下的 GIF

html - 内容显示在链接下方

html - 是否有 CSS 弹跳过渡

asp.net - 如何将 css 样式设置为 asp.net 按钮?

html - 您能否仅将 CSS 应用于包装的文本,即第二行和后续行?

html - 如何在下拉 CSS 列表中显示缩略图以及其他文本样式