如何让水平菜单过大时向左移动
我在我的网站上有水平菜单: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 的认为这是如何当它是错的,应该做
这似乎为我达到了预期的效果(我没有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; */
}
注意:CSS不采取//风格的评论,所以不要直接粘贴或任何东西;先删除那些。 (不要试图挑剔,只是不知道OP的熟悉程度。) – 2010-03-12 10:51:25
@D_N:正确的,固定的。 – 2010-03-12 10:55:46
试过了,这样更好,现在我要在更多的浏览器上测试它,谢谢RegDwight。在此页面上测试它:http://www.alcmariavictrix.nl/Algemeen/test2.html – Michael 2010-03-12 10:56:49
你的照片不适合我。 – 2010-03-12 10:16:51
他们现在做:)谢谢注意 – Michael 2010-03-12 10:24:32