Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 调整大小时页脚重叠内容_Html_Css_Footer - Fatal编程技术网

Html 调整大小时页脚重叠内容

Html 调整大小时页脚重叠内容,html,css,footer,Html,Css,Footer,我创建了一个粘性页脚,它似乎停留在页面底部。唯一的问题是,当我通过向上拖动浏览器底部来最小化浏览器时,上面的内容与页脚重叠。Content div包含最小化时位于页脚顶部的图像。页脚中的类型也会显示在图像上方(最小化时)。任何帮助都将不胜感激。多谢各位 要使内容向下压页脚,需要为内容div提供与页脚高度匹配的负底边距 .supercontainer { min-height: 100%; height: auto !important; height: 100%; ma

我创建了一个粘性页脚,它似乎停留在页面底部。唯一的问题是,当我通过向上拖动浏览器底部来最小化浏览器时,上面的内容与页脚重叠。Content div包含最小化时位于页脚顶部的图像。页脚中的类型也会显示在图像上方(最小化时)。任何帮助都将不胜感激。多谢各位


要使内容向下压页脚,需要为内容div提供与页脚高度匹配的负底边距

.supercontainer {
   min-height: 100%;
   height: auto !important;
   height: 100%;
   margin: 0 auto -100px;
   position: relative;
  }

.footer {
   background-color: black;
   width: 100%;
   height: 100px;
 }

问题,请考虑提供一个在线演示来演示这个问题。嗨,柯林,谢谢你的回复。也许我在我的帖子里不清楚。我试图让我的页脚与Hashem示例中的一样工作。我想我可能已经知道问题出在哪里了……我把content div设置为100vh,这是因为某种原因造成的重叠?
.supercontainer {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -4em;
  position: relative;
  }

.footer {
   background-color: black;
   width: 100%;
   height: 100px;
 }
  .push {
  height: 100px;
}
.supercontainer {
   min-height: 100%;
   height: auto !important;
   height: 100%;
   margin: 0 auto -100px;
   position: relative;
  }

.footer {
   background-color: black;
   width: 100%;
   height: 100px;
 }