2010-03-12 81 views
0

我在我的網站上有水平菜單:http://www.alcmariavictrix.nl 當我在小型瀏覽器(IPhone)中瀏覽它時,頂部的水平菜單被擰緊。當瀏覽器無法在一行中顯示時,我想要執行的是將左側水平菜單置於左側。如何讓水平菜單過大時向左移動

有誰知道如何做到這一點? 例如:

The right way http://www.alcmariavictrix.nl/images/right-way.png 正確的方式做到這一點

The wrong way http://www.alcmariavictrix.nl/images/wrong-way.png 這是我不想

This should the wrong way be doing http://www.alcmariavictrix.nl/images/this-should-do.png 的認爲這是如何當它是錯的,應該做

+0

你的照片不適合我。 – 2010-03-12 10:16:51

+0

他們現在做:)謝謝注意 – Michael 2010-03-12 10:24:32

回答

2

這似乎爲我達到了預期的效果(我沒有iPhone,所以我無法在該環境中測試):

#header { 
background:transparent url(images/design/header_bg_home.png) no-repeat scroll right bottom; 
clear:both; 
height:325px; 
width:960px; 
position:relative; /* added */ 
} 

#menu_horiz { 
height:81px; 
position:absolute; /* added */ 
right:24%;   /* added, tweak this value if needed */ 
/* removed: 
    float:left; 
    margin-left:206px; 
    width:542px; */ 
} 
+0

注意:CSS不採取//風格的評論,所以不要直接粘貼或任何東西;先刪除那些。 (不要試圖挑剔,只是不知道OP的熟悉程度。) – 2010-03-12 10:51:25

+0

@D_N:正確的,固定的。 – 2010-03-12 10:55:46

+0

試過了,這樣更好,現在我要在更多的瀏覽器上測試它,謝謝RegDwight。在此頁面上測試它:http://www.alcmariavictrix.nl/Algemeen/test2.html – Michael 2010-03-12 10:56:49