2013-10-26 98 views
0

我管理一個WordPress網站,並且在主內容div後面應用自定義背景時遇到了一些麻煩。以下是該網站的鏈接:AccelePedia。您會看到主要內容div設置爲寬度的85%,並且每邊都是空白區域。我嘗試過所有的東西,但我無法將背景應用到該空白區域。我已經包含了與我們正在查看的div相關的代碼。任何幫助在這裏將不勝感激。 :)WordPress 85%寬度內容Div背景

如果它有幫助,我運行Wordpress 3.6.1 2013主題。 (我已修改)

謝謝!

/** 
* 3.0 Basic Structure 
* ---------------------------------------------------------------------------- 
*/ 

body 
{ 
    background: url(http://accelepedia.com/accimages/background02.png) repeat-x top  left; 
    width: 100%; 
} 

.site { 
    background: url(http://accelepedia.com/accimages/background02.png) repeat-x top  left; 
    border-left: 1px solid #f2f2f2; 
    border-right: 1px solid #f2f2f2; 
    max-width: 1600px; 
    width: 100%; 
} 

.site-main { 
    position: relative; 
    width: 85%; 
    margin-left:auto; 
    margin-right:auto; 
    margin-top: 5px; 
    border: 5px solid gray; 
    background: #000; 
    z-index: 1000; 
} 

.site-main .sidebar-container { 
     background-image: url(http://accelepedia.com/accimages/background02.png) 
    height: 0; 
    position: absolute; 
    top: 40px; 
    width: 100%; 
    z-index: 1; 
} 

.site-main .sidebar-inner { 
    background-image: url(http://accelepedia.com/accimages/background02.png) 
    margin: 0 auto; 
    max-width: 1040px; 
} 

回答

1

背景圖像不存在:

http://accelepedia.com/accimages/background02.png <該文件返回404

當我設置了以下工作原理:

body { 
background-image: url(https://www.google.com/images/srpr/logo11w.png); 
} 
+0

我想這一點,但背景根本沒有改變。 :\ – XONAR

+0

嘗試更改身體的背景顏色,如下所示: body {background-color:green; }您在問題中使用的圖片仍然不存在於服務器上,我認爲您需要上傳圖片或更改網址 –