Ok, I've done my best to keep from having to post this in the forums for others to help me with it since this is a submission of mine... However, I can't seem to find a "fix" for this issue.
I created a CSS based horizontal menu which resembles the Vista look and feel. The problem with it is that it's set to 100% width. IE won't display the width at 100% if you zoom out your browser. If your browser is set to 100%, then it displays fine, but if you zoom out, then the menu shrinks UNTIL you hover over a menu item, then it re-expands and fills the entire width of the browser.
I am nearly bald now from trying to figure this out. I have tried countless methods and hacks to try to get this to work right, but I can't seem to get it.
Can anyone help?
Here is the demo page:
http://www.eight7teen.com/Vista_CSS_...ista_Menu.html
and...
Here is the source code:
Code:<HTML> <HEAD> <TITLE> Vista Style CSS Menu </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT="Josh Jones"> <base href="http://www.eight7teen.com/Vista_CSS_Menu/" /> <style type="text/css"> /*///////////////Tried adding this to reset padding/margin thinking maybe that was the problem...//////////////////// *{ margin:0; padding:0; } ////////////////////////////////No avail///////////////////////////////////////*/ body{ background:#ababab; font-size:14px; font-family:Verdana; color:#505050; /*Thought maybe this little hack that is often used to keep footers at the bottom might be able to be used to make sure this thing stays 100% width*/ width: auto !important; width: 100%; min-width:100%; /*End Footer Style percentage hack*/ } #menubar{ overflow: hidden; width: auto !important; /*This is the footer hack used in another area (still not working)*/ width: 100%; /*This is the footer hack used in another area (still not working)*/ min-width:100%; /*This is the footer hack used in another area (still not working)*/ height:32px; background: url('images/menubar_x.png') repeat-x; padding: 0; } /*This was a suggestion from someone else which didn't work, then I added many other things to it, still didn't work*/ * html #menubar{ width: auto !important; width: 100%; min-width:100%; position:absolute; right:0px; left:0px; margin-right:0px; padding-right:0px; } /*End suggestion*/ /*Begin Menubar Buttons CSS*/ #menubar a.button{ background: transparent url('images/button_left.png') no-repeat top left; display: block; float: left; line-height: 30px; height: 32px; margin-left:25px; padding-left: 12px; margin-right: 15px; } #menubar a.button:link, #menubar a.button:visited{ background: transparent; display: block; float: left; font-family:Calibri, Arial; font-size: 18px; color: #ffffff; font-weight:normal; line-height: 30px; height: 32px; margin-left:25px; padding-left: 12px; text-decoration: none; margin-right: 15px; } #menubar a.button span{ background: transparent; display: block; padding: 0px 12px 0px 0; } /*End Menubar Buttons CSS*/ /*Begin Menubar :hover & :active effect*/ #menubar a.button:hover{ background: transparent url('images/button_left.png') no-repeat top left; display: block; float: left; font-family:Calibri, Arial; font-size: 18px; color: #ffffff; font-weight:normal; line-height: 30px; height: 32px; margin-left:25px; padding-left: 12px; text-decoration: none; margin-right:15px; } #menubar a.button:hover span{ background: transparent url('images/button_right.png') no-repeat top right; display: block; padding: 0px 12px 0px 0; } #menubar a.button:active{/*Note: "active" links only seem to work in IE*/ background: transparent url('images/button_left.png') no-repeat top left; display: block; float: left; font-family:Calibri, Arial; font-size: 18px; color: #ffffff; font-weight:normal; line-height: 30px; height: 32px; margin-left:25px; padding-left: 12px; text-decoration: none; margin-right:15px; } #menubar a.button:active span{/*Note: "active" links only seem to work in IE*/ background: transparent url('images/button_right.png') no-repeat top right; display: block; padding: 0px 12px 0px 0; } /*End Menubar :hover & :active effect*/ /*Begin Menubar Left "Cap"*/ #menubar .leftcap{ background:url('images/menubar_leftcap.png') no-repeat; float: left; width: 5px; height:32px; position: relative; top: 0px; left:0px; } /*End Menubar Left "Cap"*/ /*Begin Menubar Right "Cap"*/ #menubar .rightcap{ background:url('images/menubar_rightcap_search.png') no-repeat; float: right; width: 162px; height:32px; position: relative; top: 0px; right:0px; } #menubar .rightcap input{ height:17px; width:132px; background:url('images/search_bg.png') no-repeat; color:#5E646F; font-size:10px; border:1px solid #254367; position:relative; top:7px; right:0px; } /*End Menubar Right "Cap"*/ </style> </HEAD> <BODY> <h2>Josh's Vista Style CSS Menu Bar</h2> <!--Begin Menu HTML--> <div id="menubar"> <span class="leftcap"> </span> <a href="#" class="button"><span>Home</span></a> <a href="#" class="button"><span>About</span></a> <a href="#" class="button"><span>Products</span></a> <a href="#" class="button"><span>Services</span></a> <a href="#" class="button"><span>Clients</span></a> <a href="#" class="button"><span>Downloads</span></a> <a href="#" class="button"><span>Contact</span></a> <a href="#" class="button"><span>FAQ</span></a> <span class="rightcap"> <input type="text" value="Search..." onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search...';}" name="search" id="search"/> </span> </div> <!--End Menu HTML--> </BODY> </HTML>



Reply With Quote



Bookmarks