2010-11-06 92 views
3

我正在嘗試創建一個粘貼到頁面底部的頁腳。我有:css粘頁腳在一個asp.net頁面

<body> 
    <form id="form1" runat="server"> 
    <div id="wrap"> 
     <div id="content"> 
      <uc2:logo ID="logo1" runat="server" /> 
     </div> 
    </div> 
    <uc1:footer ID="footer1" runat="server" /> 
    </form> 
</body> 

這裏是我的CSS

body { 
    margin: 30px 10px 0px 10px; 
    font-size: 14px; 
    font: 76% Arial,Verdana,Helvetica,sans-serif; 
} 
html, body, form, #wrap { height: 100%; } 
form > #wrap { height: auto; min-height: 100%; } 

#wrap { 
    width: 1000px; 
    margin: auto; 

} 

#content { 

    text-align:left; 

} 


#footer { 
clear: both; 
position: relative; 
z-index: 10; 
width:1000px; 
margin:auto; 
} 

我缺少什麼?頁腳出現在視口下方(滾動條也在頁面上)。我期待它成爲一些類型的保證金問題。

回答

1

嘗試位置絕對:

#footer { 
clear: both; 
position: absolute; 
z-index: 10; 
width:1000px; 
margin:auto; 
bottom:0px; 
height:50px; 
} 
+0

耶 - 位置:絕對;也在解決方案中。謝謝! – FiveTools 2010-11-07 19:17:21