2017-04-17 120 views
1

我的頁腳在我的聯繫頁面上放置有問題。在我網站的其他頁面上,頁腳正確放置在頁面的底部,但由於某種原因頁腳位於我的表格之上,甚至覆蓋了第一個輸入框。有人可以幫幫我嗎?頁腳在表格後不留在頁面底部

這裏是我的聯繫形式編碼:

footer { 
 
\t display: block; 
 
    clear: both; 
 
    font-size: 0.8em; 
 
    height: 50px; 
 
    text-align: center;  
 
\t width:960px; \t 
 
\t margin: auto; 
 
\t position: absolute; 
 
    } 
 

 
    footer .footer-wrapper { 
 
    margin: 0; 
 
    padding: 3px 20px; 
 
    } 
 

 
    ul#social li { 
 
    display: inline; 
 
    list-style: none; 
 
    } 
 

 
    ul#social li a { 
 
     color: #999; 
 
     text-decoration: none; 
 
    } 
 

 
    a.facebook, a.twitter { 
 
     display: block; 
 
     float: left; 
 
     height: 24px; 
 
     padding-left: 17px; 
 
     text-indent: -9999px; 
 
     width: 16px; 
 
    }
<section> 
 
    <div> 
 
\t <form name="customerForm" method="post" action="?"> 
 
\t \t <table cellspacing="3" cellpadding="5" border="0" style="width: 95%;" align="center"> 
 
\t \t <tr> 
 
\t \t \t <td>Name: </td> 
 
\t \t \t <td><input type="text" name="cusName" size="25" value="<?php echo $fullName; ?>" /></td> 
 
\t \t </tr> 
 
\t \t <tr> 
 
\t \t \t <td>Email: </td> 
 
\t \t \t <td><input type="text" name="cusEmail" size="30" value="<?php echo $emailAddress; ?>" /></td> 
 
\t \t </tr> 
 
\t \t <tr> 
 
\t \t \t <td>Mobile: </td> 
 
\t \t \t <td><input type="text" name="cusMobile" size="25" value="<?php echo $mobilePhone; ?>" /></td> 
 
\t \t </tr> 
 
\t \t <tr> 
 
\t \t \t <td>Enquiry: </td> 
 
\t \t \t <td><textarea name="posting" cols="52" rows="25"><?php echo $posting; ?></textarea></td> 
 
\t \t </tr> 
 
\t \t <tr> 
 
\t \t \t <td colspan="2"><input type="submit" name="submit" value="Send" />&nbsp; 
 
\t \t \t <input type="reset" name="reset" value="Clear Form"/></td> 
 
\t \t </tr> 
 
\t </form> 
 
\t 
 
    </div> 
 
    </section> 
 
    <footer> 
 
      <div class="footer-wrapper"> 
 
       <div class="float-left"> 
 
        <p>&copy; My-Com Computers</p> 
 
       </div> 
 
       <div class="float-right"> 
 
        <ul id="social"> 
 
         <li><a href="http://facebook.com" class="facebook">Facebook</a></li> 
 
         <li><a href="http://twitter.com" class="twitter">Twitter</a></li> 
 
        </ul> 
 
       </div> 
 
      </div> 
 
     </footer> 
 

回答

-1

你錯過了表的結束標記您的HTML </table>

<section> 
<div> 
<form name="customerForm" method="post" action="?"> 
<table cellspacing="3" cellpadding="5" border="0" style="width: 95%;" align="center"> 
<tr> 
    <td>Name: </td> 
    <td><input type="text" name="cusName" size="25" value="<?php echo $fullName; ?>" /></td> 
</tr> 
<tr> 
    <td>Email: </td> 
    <td><input type="text" name="cusEmail" size="30" value="<?php echo $emailAddress; ?>" /></td> 
</tr> 
<tr> 
    <td>Mobile: </td> 
    <td><input type="text" name="cusMobile" size="25" value="<?php echo $mobilePhone; ?>" /></td> 
</tr> 
<tr> 
    <td>Enquiry: </td> 
    <td><textarea name="posting" cols="52" rows="25"><?php echo $posting; ?></textarea></td> 
</tr> 
<tr> 
    <td colspan="2"><input type="submit" name="submit" value="Send" />&nbsp; 
    <input type="reset" name="reset" value="Clear Form"/></td> 
</tr> 
</table><!-- new added--> 
</form> 

</div> 
</section> 

這裏是你的輸出https://jsfiddle.net/mxmd5jq9/

+0

所以我做到了。非常感謝你=) – Joel

-1

ÿ你忘了關閉表標記

<section> 
<div> 
<form name="customerForm" method="post" action="?"> 
    <table cellspacing="3" cellpadding="5" border="0" style="width: 95%;" align="center"> 
    <tr> 
     <td>Name: </td> 
     <td><input type="text" name="cusName" size="25" value="<?php echo $fullName; ?>" /></td> 
    </tr> 
    <tr> 
     <td>Email: </td> 
     <td><input type="text" name="cusEmail" size="30" value="<?php echo $emailAddress; ?>" /></td> 
    </tr> 
    <tr> 
     <td>Mobile: </td> 
     <td><input type="text" name="cusMobile" size="25" value="<?php echo $mobilePhone; ?>" /></td> 
    </tr> 
    <tr> 
     <td>Enquiry: </td> 
     <td><textarea name="posting" cols="52" rows="25"><?php echo $posting; ?></textarea></td> 
    </tr> 
    <tr> 
     <td colspan="2"><input type="submit" name="submit" value="Send" />&nbsp; 
     <input type="reset" name="reset" value="Clear Form"/></td> 
    </tr> 
    </table> 
    </form> 
</div> 
</section> 
+0

你好,我有同樣的答案提出這個問題,所以爲什麼你沒有看到之前,你給你的答案 –

+0

:D我沒有看到你的答案兄弟,這是一個問題? – kebir

+0

對不起@kebir,但我不覺得好,​​當你找到解決方案有人給出相同的答案 –