2012-02-19 27 views
0

嘿傢伙我建立我的第一個網站,我無法弄清楚如何擺脫右側多餘的空間,這將帶來水平滾動條。該網站是http://qtsocial.com/accounts/login/ ...如果你可以看看CSS並給我一個線索,我會非常感激。謝謝!標題將不會跨越整個頁面/額外的空間在右邊

body { 
    background: url(http://qtsocial.com/static/images/body-bkg.png) repeat scroll; 
    margin: 0; 
    padding: 0; 
} 

.container { 
    margin: 0pt auto; 
    width: 100%; 
} 

#header { 
    background: url(http://qtsocial.com/static/images/hdr-bkg.png); 
    background-repeat: repeat-x; 
    height: 181px; 
    position: absolute; 
    z-index: 100; 
    top: 0px; 
    left: 0px; 
    width: 100%; 
    margin: 0; 
    padding: 0; 
} 

#logo { 
    background-image: url(http://qtsocial.com/static/images/QTlogo.png); 
    background-repeat: no-repeat; 
    height: 88px; 
    position: absolute; 
    top: 40px; 
    left: 25px; 
    width: 100%; 
} 

#navigation{ 
    height:40px; 
    z-index: -1; 
} 

回答

0

您有logo設置爲100%寬度的ID的DIV(這是設置它到頁面寬度),然後你縮進25px。將login.css的第25行上的#logo的寬度更改爲您正在使用的背景圖像的寬度(299px)。

0

標誌太寬

#logo變化width: 100%;width: 299px;(圖像的實際寬度)

0

您的標誌div是什麼造成它。

它是寬度的100%,但不包括其左側的25像素,因此它在窗口右側溢出25像素。

將徽標div的寬度更改爲徽標圖像的寬度,並且不會溢出到右側。

+0

填充不會影響'背景圖像' – 2012-02-19 02:54:08

+0

意識到我張貼後30秒,然後修復它。 – xthexder 2012-02-19 02:57:19