簡體   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