2011-07-07 147 views
1

我的URL:http://www.dreambelle.com/ enter image description here 背景圖像(白色主,灰色側杆),該文本和側欄在滑塊下方的後面被放置太低。你可以看到這個問題的側欄內容後面的滑塊的權利......如何改變背景圖像上漿

的問題是,我無法弄清楚如何通過CSS移動的背景圖像,而不會移動整個身體內容?因爲你的div#content,其具有background-image放置您div#featured_body,這是將其向下推下面

+0

什麼是你的CSS看起來像背景圖片? – brenjt

回答

1

你需要做兩件事(做了更小的高度#featured_body),並調整對#sidebar保證金

伊夫測試了以下這個工作對我來說在FF5:

// Remove 10px from the #featured_body height 
#featured_body { 
    background: url("images/bgr_board.png") repeat scroll 0 0 transparent; 
    float: left; 
    height: 356px; 
    margin: 0 12px; 
    padding: 0; 
    width: 618px; 
} 

// Add 10px to the sidebar top margin 
#sidebar { 
    float: left; 
    height: auto; 
    margin: -375px 0 20px; 
    padding: 0; 
    width: 332px; 
} 
0

這是發生 enter image description here 背景圖像從一個小棒(附後)呈現。

你有兩個選擇,因爲我看到它:

  1. 使div#featured_body較小的高度方向上,使背景圖片排隊與twitter div

  2. 地方花葯wrapper div周圍的一切在nav下的內容並將background-image添加到該內容。 (也就是說,如果你想讓bg-img伸展到頁面的頂部)。