2012-07-07 80 views
0

我只是試圖刪除水平欄。我以1280x800分辨率瀏覽網站,所以不應該有橫條。需要固定站點的寬度以刪除水平滾動條

它發生在鉻,firefox和safari。

您可以訪問網站:http://ilmioforno.com

而且我的代碼,

body { 
background: #f1eee3; 
color: #111; 
margin: 0; 
    } 
#page { 
    border: solid black 4px; 
    clear: both; 
} 

#wrap { 
    clear: both; 

    } 

#content { 
    margin: 0 auto; 
    padding: 20px; 
    border-radius: 10px; 
    moz-border-radius: 10px; 
    -webkit-border-radius: 10px; 
    background: #b63b3b; 
    border: 3px solid #942a2a; 
    color: #51301f; 
    font-size: 13px; 
    width: 65%; 


} 

回答

2

問題是div#nav它有一個span-24它將寬度設置爲950px,而您還有餘量爲360px。由於您不會隱藏任何包含元素的溢出,因此這實際上會產生1310像素的整體寬度。您需要調整導航的寬度。我假設你的總體聽衆/頁面是950,所以這意味着你的導航最多應該是950 - 360 = 590

1

#nav刪除maring-left

#nav { 
    color: #51301F; 
    /*maring-left: 360px;*/ 
    margin-top: -120px; 
    font-weight: bold; 
    font-size: 22px; 
    text-transform: uppercase; 
    background: none; 
} 

,並把它添加到.menu

.menu{ 
    maring-left: 360px; 
}