Pls help!!!
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>
Why do the elements from the menu on the right keep going on a new row one by one on browser window resizing?? How can i make it stop doing that and enable it to just resize like the image on the left, upon browser window resizing (as if the whole menu would be a full block)? Can it be done in CSS or do i need to make a javascript? Thanks to anyone who answers!
It is not easy to understand what you are trying to achieve here without the actual images. I have reproduced your case here:
http://jsfiddle.net/gVQ8x/1/
I’ve just set percentage width here (what’s the
-ms-interpolation-modepart for?):I strongly advise you against using IE hacks. Try conditional classes instead: http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
Another important issue that might cause problems in the future is that you have multiple elements in your document that share the same id, namely the aforementioned
body #header #h_r #menu. The id must be unique if you want the javascript DOM manipulations to work properly and predictably.