繁体   English   中英

页脚仅重叠一页

[英]Footer overlapping only one page

页脚与我的网页之一重叠。 所有其他页面都很好,但这个重叠,我真的不想编辑/更新页脚,因为它在其他页面中工作,但我想看看我是否可以用这个页面的 css 容器做些什么.

CSS

#box {
  width: 100%;
  height: auto;
  margin-top: 20px;
  position:relative;
  padding-right:0.4%;
  float:left;
  margin-bottom: 10px;
}

.boxChildLeft {
  left: 0;
  width: 80%;
  height: 100px;
  border: 1px solid;
  margin-bottom: 2px;
  position: relative;
  float: left;
}

CSS 页脚/正文等

html,
body {
  margin:0 auto;
  padding: 0;
  max-width: 960px;
  height: 100%;
  background-color: white;
}
#container {
  min-height:100%;
  position:relative;
}
#header {
  background:white;
  padding:10px;
}
#body {
  padding:10px;
  padding-bottom:40px;   /* Height of the footer */
}
#footer {
  position: absolute;
  bottom:0;
  left: 0;
  right: 0;
  height:40px;   /* Height of the footer */
  background:#EBEBEB;
  border-radius: 5px;
}

PHP/HTML

for($temp = 1; $temp <= $cArray[2]; $temp++)
{
  $img .= "<div class='boxChildLeft'>
            <div class='img'>
              <img src='../ProductImages/$cArray[0].jpg' width='100px' height='100px'>
            </div>
            <div class='prodInfo'>
                  <p1>$pName</p1><br>
                  <span id='sp'><p1>$pPrice<p1>
                  </span>
            </div>
         </div>";
}

HTML

<div id="box">
    <?php echo $img;?>
</div>

您提供的信息还不够,我建议使用 W3school HTML验证器,它会指出您的 HTML 实现中缺少什么,它会通过提供建议来帮助您。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM