首页 > 解决方案 > 集中显示页脚内容

问题描述

我正在尝试集中显示页脚的内容,但它似乎不起作用。有没有人有什么建议?提前致谢。

footer{
    position: fixed;
    bottom: 0;
    width: 100%;
    height:50px;
    color:whitesmoke;
    text-align:center;
    line-height:50px;
    ackground-color:#76323f;
    display:flex;
    align-items:center;
    justify-content:center;
}
<footer>
     Melbourne Public Library Catalogue Site: STAFF ONLY
     <img id ="html" src="Images/HTML5.png" class ="html"/>
     © 2018
</footer>

标签: css

解决方案


我注意到您将“背景”一词错误地拼写为“背景”,这阻止了背景颜色变暗,因此白色文本没有显示,并且看起来页脚没有显示。这是固定的CSS块。这应该可以解决问题,页脚内容居中。请让我知道这是否有帮助。

footer{
  position: fixed;
  bottom: 0;
  width: 100%;
  height:50px;
  color:whitesmoke;
  text-align:center;
  line-height:50px;
  background-color:#76323f;
  display:flex;
  align-items:center;
  justify-content:center;
}

推荐阅读