2011-01-13 70 views
0

我在頁面內容包裝(其他所有內容)之外做了一個頁腳包裝。我想使頁腳擴展以填充頁面的寬度,我希望它固定在底部。下面的代碼:將頁腳擴展爲頁面寬度

footerWrap {

background-color:#000; 
width: auto; 

}

頁腳{

margin: auto; 
text-align:center; 
width:965px; 
height:150px; 
background-color:#000; 
border:#000 inset medium; 

}

該網站是item9andthemadhatters.com請讓我知道如果你需要任何其他代碼或信息。謝謝!!

更新:

HTML { 填充:0; 身高:100%; 寬度:100%; }

body { margin:-1px 0 0 0; background-color:#FFF; font-family:calibri; background-image:url(images/item9HeaderSideFiller.gif); background-repeat:repeat-x; 填充:0; 身高:100%; 寬度:100%; }

渦卷{

width: 965px; 
margin:auto auto; 
min-height:462px; 
max-height:4000 

PX;

footerWrap {

background-color:#000; 
position:absolute; 
bottom:0; 
width:100% 

}

頁腳{

margin: auto; 
text-align:center; 
width:965px; 
height:150px; 
background-color:#000; 

}

}

+0

#footerWrap { \t background-color:#000; \t position:absolute; \t bottom:0; \t寬度:100% \t } #footer的{ \t餘量:汽車; \t text-align:center; \t width:965px; \t height:150px; \t background-color:#000; } – hawkeye126 2011-01-13 21:48:19

+0

html { \t padding:0; \t身高:100%; \t寬度:100%; } body { \t margin:-1px 0 0 0; \t background-color:#FFF; \t font-family:calibri; \t background-image:url(images/item9HeaderSideFiller.gif); \t background-repeat:repeat-x; \t padding:0; \t身高:100%; \t寬度:100%; } #wrap { \t width:965px; \t margin:auto auto; \t min-height:462px; \t max-height:4000px; } – hawkeye126 2011-01-13 21:48:37

回答

1

以填充頁面

width:100% 

留在頁面底部的解決方案可能是

position:absolute; 
bottom:0; 

通知,在身體和HTML中你必須設置

padding:0 
height:100%; 
+0

感謝您的幫助!這沒有奏效。我會發布更多的代碼。 – hawkeye126 2011-01-13 21:47:46

0

在footerWrap嘗試width:100%。另外,你是什麼意思固定在底部?你的意思是頁腳應該始終在屏幕的底部,即使滾動時也是如此?或者你的意思是它應該總是在頁面的底部?