【问题标题】:Div overwriting footerdiv覆盖页脚
【发布时间】:2019-04-24 17:47:57
【问题描述】:

我有一个 div 和一个页脚。我的 div 仅用于显示错误消息。当 div 收到错误列表时,它会覆盖页脚。

我尝试将页脚用作“相对”,但页脚位于屏幕中间,我需要它始终位于底部。

有谁知道如何让页脚保持响应或其他解决方案,使其不会在屏幕上丢失?

.box-errors {
overflow: auto;
min-height: 100px;
}

.footer {
position: absolute;
bottom: 0;
width: 100%;
height: auto;
line-height: 58px;
background-color: #000;
color: #ffffffc4;
font-size: 12px;
text-align: center;
}

Obs.:页脚为黑色,div 为红色。

【问题讨论】:

标签: html css angular responsive


【解决方案1】:

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 11;
  width: 100%;
  height: auto;
  line-height: 58px;
  background-color: #000;
  color: #ffffffc4;
  font-size: 12px;
  text-align: center;
}

【讨论】:

    猜你喜欢
    • 2021-08-05
    • 1970-01-01
    • 2020-12-11
    • 1970-01-01
    • 2022-01-11
    • 2016-12-10
    • 2015-09-02
    • 2015-08-26
    • 1970-01-01
    相关资源
    最近更新 更多