php - 页脚仅重叠一页

标签 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 validator它会指出您的 HTML 实现中缺少什么,它会通过提供建议来帮助您。

关于php - 页脚仅重叠一页,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45014961/

相关文章:

javascript - 标签输入插件不适用于 bootstrap 3

php - 如何在 laravel 中使用 javascript 的 post 方法将数据传递给 Controller

php - 仅针对特定条件的日期

php - 如何在没有鉴别器列的情况下从 Doctrine-Entity 进行扩展

php - 使用 php 在从数据库检索的表中添加按钮

javascript - 如何更改CKEditor的编辑器大小?

html - 表格单元格中的 div 100%

javascript - 从每个函数中的特定索引开始

html - 我有两个表,但希望其中一个忽略 Tablecloth CSS

html - 使用 AngularJS 更改 CSS 取决于文本框值