页脚仅重叠一页

  • 本文关键字:一页 重叠 php html css
  • 更新时间 :
  • 英文 :


页脚与我的一个网页重叠。 所有其他页面都很好,但这个页面是重叠的,我真的不想编辑/更新页脚,因为它在其他页面中工作,但我想看看是否可以使用此页面的 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 实现中缺少的内容,它将通过提供建议来帮助您。

最新更新