请帮忙!!!
CSS:
body
{
margin: 0px;
padding: 0px;
}
body #header {
width:100%;
clear:both;
height:90px;
/*overflow:hidden*/;
box-shadow: 1px 0px 10px 2px #000;
}
body #header #h_l {
width: 30%;
height: 90px;
background-image: linear-gradient(top, #e1e1e1 40%, #9d9d9d 99%);
background-image: -o-linear-gradient(top, #e1e1e1 40%, #9d9d9d 99%);
background-image: -moz-linear-gradient(top, #e1e1e1 40%, #9d9d9d 99%);
background-image: -webkit-linear-gradient(top, #e1e1e1 40%, #9d9d9d 99%);
background-image: -ms-linear-gradient(top, #e1e1e1 40%, #9d9d9d 99%);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(40%, #e1e1e1), color-stop(99%, #9d9d9d)); /* Safari 4+, Chrome 2+ */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e1e1e1', endColorstr='#9d9d9d'); /* IE6 & IE7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#e1e1e1', endColorstr='#9d9d9d')"; /* IE8+ */
background-image: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.40, #e1e1e1),
color-stop(0.99, #9d9d9d)
);
float:left;
}
body #header #h_l #logo {
float: right;
/*-ms-interpolation-mode:bicubic; */
max-width: 100%;
width: auto\9; /* ie8 */
}
body #header #h_r {
width: 70%;
height: 90px;
background: #747474;
float: right;
}
body #header #h_r #menu {
position: relative;
left: -50px;
float:left;
/*-ms-interpolation-mode:bicubic; */
max-width: 100%;
width: auto\9; /* ie8 */
}
HTML:
<body >
<div id="header">
<div id="h_l">
<img id="logo" title="logo" alt="logo" src="{HTTP}{WEBSITE}/images/newlook/MM/logo_plus100px_right.png" >
</div>
<div id="h_r">
<span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Home_but.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Divider_1.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Solutions_but.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Divider_1.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Support_but.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Divider_1.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Company_but.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Divider_1.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Contact_but.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Divider_1.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Blog_but.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Divider_1.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Reseller_but.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Divider_1.png" ></span><span ><img id="menu" title="" alt="" src="{HTTP}{WEBSITE}/images/newlook/MM/Apps_but.png" ></span>
</div>
</div>
</body>
为什么右侧菜单中的元素在浏览器窗口调整大小时不断在新的一行中进行?我怎样才能让它停止这样做并让它像左边的图像一样调整大小,在浏览器窗口调整大小时(好像整个菜单都是一个完整的块)?它可以用 CSS 完成还是我需要制作一个 javascript?感谢任何回答的人!