【问题标题】:displacement of a single HTML element at the opening of another单个 HTML 元素在另一个 HTML 元素的开头的位移
【发布时间】:2013-08-31 15:23:32
【问题描述】:

看看我的问题:

如何使当您打开弹出窗口时您的页脚向下移动?

这里有一些 CSS:

#advanced_search_div_body {
height: 100%;
width: 817;
margin: 0 auto;
padding: 0;
display: table;
background-color: white;
}

#foot {
padding: 30px 0px;
background-color: black;
clear: both;
position: relative;
bottom: 0;
width: 100%;
overflow: hidden;
z-index: 2;

}

【问题讨论】:

  • 请提供更多代码
  • 你的宽度少了一个单位(817 应该是817px

标签: html css position footer


【解决方案1】:

可能您需要告诉页脚位于页面下方。

所以,基本上改变 #foot 位置:相对于绝对位置。试试这个:

position:absolute;
width:100%;
bottom:0px;

或者类似的东西:

position:fixed;
bottom:0;
width:100%;

【讨论】:

【解决方案2】:

诀窍是推动 div:

body,html{
    height:100%;
    display:block;
}
#pusher{
    display:block;
    min-height:100%;
}

演示:http://jsfiddle.net/nLKLh/1/

【讨论】:

  • 看不懂,在哪里添加 pusher div
  • 只需将它放在正文中除页脚之外的所有其他内容上。
猜你喜欢
  • 2015-02-12
  • 2015-03-25
  • 2019-06-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-10-10
  • 2013-10-11
相关资源
最近更新 更多