2012-01-05 28 views
0

我遇到了一個我正在改變的網站的問題。頁面的背景不會像我放在側面的橫幅那樣繼續,因此這個網站看起來很可怕。你能幫我弄清楚如何延長容器的背景,只要橫幅(1500px)? 對不起,我對這個問題的描述太模糊了,我在這裏給這個網站提供了一個鏈接,讓你可以更好地看到我的意思。 這是http://gentlecare.ro/index.php?route=information/information&information_id=6只要頁面能如何製作背景?

非常感謝, 光圈

+0

我已經設法使背景更長的時間,感謝所有的反應,但頁腳始終與側面沒有鮮花結束了,不管多久,我讓那些橫幅,我不明白爲什麼。 – mwentosana 2012-01-05 11:29:27

回答

2

您可以使用背景-size屬性。限於現代瀏覽器的思想。你也可以直接渲染背景圖片。

2

好像你有一個CSS語法錯誤:

#column_left { 
    float:left; 
     width:230px; 
     clear:; // needs to be "clear:both" 
     padding:30px 0 0 10px; 
       } 
1
<div id="container-inner"> 
<div id="header"> 
<div id="column_left"> 
<div id="column_right"> </div> 
<div id="content"> 
<div style="clear:both"></div>// add this 
<div id="footer"> 
<div style="clear:both"></div>// add this 
</div> 

#container { 
     background-image: url("../image/layout/bg-container.jpg"); 
     background-size: 990px 1518px; 
    } 

#footer { 
    background: url("../image/layout/bg-footer.jpg") no-repeat scroll center top transparent; 
    bottom: 0; 
    height: 60px; 
    margin: -130px 0 0; 
    padding: 70px 20px 0; 
    position: relative; 
} 
2

由於橫幅有一個固定的高度,你可以添加同一高度屬性到您的#container ID。

#container { 
width: 990px; 
margin-left: auto; 
margin-right: auto; 
text-align: left; 
background: url(../image/layout/bg-container.jpg) center 0 repeat-y; 
height: 1504px; 
}