Permabanned
- Joined
- 25 Oct 2004
- Posts
- 9,078
Been trying now for over an hour to get this damn horizontal menu to work in IE7 and i just cant figure it out. In FF its centred and the buttons are displayed correctly (the full! button) when hovered over the buttons the new ones display as it should do.
In IE7 (not even looked at IE6 yet!) the menu is not centred and the buttons are only span the width of the text not the width they should be.
Any help would be much appreciated in this matter before I break something!
menu-bg.gif is a 1x32 pixel image set to repeat on the x-axis.
menu-buttondk.gif and menu-button.gif are 78x26 pixel images.
<-- HTML -->
<-- CSS -->
Muchos gracias to anyone that can offer a helping hand
In IE7 (not even looked at IE6 yet!) the menu is not centred and the buttons are only span the width of the text not the width they should be.
Any help would be much appreciated in this matter before I break something!
menu-bg.gif is a 1x32 pixel image set to repeat on the x-axis.
menu-buttondk.gif and menu-button.gif are 78x26 pixel images.
<-- HTML -->
Code:
<div id="menucontainer">
<ul id="menulist">
<li><a href="#"><span>Demos</span></a></li>
<li><a href="#"><span>Menus</span></a></li>
<li><a href="#"><span>Layouts</span></a></li>
<li><a href="#"><span>Boxes</span></a></li>
<li><a href="#"><span>Mozilla</span></a></li>
<li><a href="#"><span>Explorer</span></a></li>
<li><a href="#"><span>Opacity</span></a></li>
</ul>
</div>
<-- CSS -->
Code:
#menucontainer {
width: 100%;
height: 32px;
background: url(images/menu/menu-bg.gif) repeat-x bottom;
font: normal .94em/26px "Lucida Grande", "Lucida Sans Unicode", verdana, lucida, sans-serif;
}
#menucontainer ul {
margin:0 auto;
padding:0;
list-style:none;
display:table;
}
#menucontainer li {
text-align: center;
display:table-cell;
float:left;
min-width: 78px;
padding: 3px 5px 3px 5px;
}
#menucontainer li a {
display:block;
position:relative;
background:url(images/menu/menu-buttondk.gif) no-repeat;
text-decoration:none;
color:#dcdcdc;
}
/* not for IE5.x or IE6 */
#menucontainer li a:hover {
background:url(images/menu/menu-button.gif) no-repeat;
color:#fff;
}
Muchos gracias to anyone that can offer a helping hand
