页脚重叠

问题描述 投票:1回答:2

我正在使用jQuery菜单幻灯片,但页脚存在一些问题。

当我放大时,我的页脚与我所有其他内容重叠。结果,如果您看到网站的分辨率较低,则您将不会获得所有内容。

我已经尝试删除绝对位置,但是页脚转到屏幕顶部。

无论内容的高度如何,我都需要页脚始终位于内容之下。

此脚本有可能吗?

网站:http://kennethkjaer.gofreeserve.com/

#footer { 
  /* Footer container (whole browser width) */
  background-image:url(../images/footer_bg.jpg);
  bottom: 0;
  position:absolute;
  width: 100%;
  height:85px;
  padding-top:10px;
  padding-bottom: 5px;
}
#footer_box { 
  /* Centered footer container with som padding to align properly the content */
  width: 820px;
  height:30px;
  margin:0px auto;
  position: relative;
  padding:0px 10px 0px 10px;
}
#footercontent {
  width: 360px;
  height: 30px;
  float: left;
  padding: 0px;
}
#footerimg {
  width: 100px;
  height: 30px;
  margin: 0px;
  float: left;
}
#footerimg p {
  float: right;
  margin: 38px 0px 0px 0px; !important;
}
jquery css footer
2个回答
2
投票

根据您的问题,我假设您不想粘贴页脚。

在那种情况下,是position:absolutebottom:0引起问题。您是在告诉页脚始终固定在底部(浏览器窗口的底部,而不是文档的底部),即使其他内容到达那里也是如此。因此,当网页上的其他内容到达浏览器窗口的底部时,页脚将其覆盖。如果删除此CSS,将解决此问题。如果HTML的页脚部分位于页面HTML的末尾,则它自然位于(document的底部),但您可能必须向下滚动才能看到它,因为它不会粘住到浏览器窗口的底部。请参阅this website以供参考。我假设这是您想要的页脚。


1
投票

首先,我想说的是您的标记不好。根据您的要求,您可以为此使用粘性页脚方法

检查链接http://ryanfait.com/sticky-footer/

© www.soinside.com 2019 - 2024. All rights reserved.