2013-06-22 35 views
0

我有一個HTML頁面,我將身體添加爲100%但是當我最小化瀏覽器和滾動主體時,仍然保持最小化的相同狀態。 enter image description here寬度適合100%不工作

+1

請添加相關代碼和相關CSS –

+0

發佈您的代碼它很容易回答你的問題 –

+0

發表您的HTML和CSS源,所以我很容易對您有所幫助。 – falguni

回答

3

我相信試試這個,

html, body{ 
    margin:0; 
    padding:0; 
    min-width: 1140px; /* this is the important part*/ 
} 
+0

爲什麼這應該是1140像素 – Anirban

+1

我相信你已經在這個網站上的主意http://www.1140px.com/ – falguni

1

試試這個?我認爲你的頭div也需要這個CSS。

html, body { 
    float:left; 
    width:100%; 
    height:100%; 
    margin:0; 
    padding:0; 
} 
#yourHeader{ 
    float:left; 
    width:100%; 
    /* 
    height:150px; bla bla... 
    */ 
}