Soldato
- Joined
- 15 Feb 2003
- Posts
- 10,172
- Location
- Europe
just need quick bit of css help.
I'm trying to convert a site from a purely tables based layout to a purely CSS based layout, ready for importing into a contend managed system, probably Modx.
Here is the site's menu;
Here is what i actually want it to look like - with images that change colour on hover and selection.
Finally here is my code:
CSS
HTML
Can anyone tell me what changes I need to make to the code to achieve the same look as the first menu image?
Thanks
I'm trying to convert a site from a purely tables based layout to a purely CSS based layout, ready for importing into a contend managed system, probably Modx.
Here is the site's menu;

Here is what i actually want it to look like - with images that change colour on hover and selection.

Finally here is my code:
CSS
Code:
.menu {
font-family: arial, sans-serif;
width:750px;
height:25px;
position:relative;
font-size:11px;
z-index:100;}
.menu ul li a, .menu ul li a:visited {
display:block;
text-decoration:none;
color:#000;
width:123px;
height:20px;
text-align:center;
color:#fff;
background:#007e3e;
line-height:20px;
font-size:11px;
overflow:hidden;}
.menu ul {
padding:0;
margin:0;
list-style: none;
}
.menu ul li {
float:left;
position:relative;
}
.menu ul li ul {
display: none;
}
/* specific to non IE browsers */
.menu ul li:hover a {color:#fff; background:#007e3e;}
.menu ul li:hover ul {display:block; position:absolute; top:21px; left:0; width:105px;}
.menu ul li:hover ul li a.hide {background:#6a3; color:#fff;}
.menu ul li:hover ul li:hover a.hide {background:#007e3e; color:#ffffff;}
.menu ul li:hover ul li ul {display: none;}
.menu ul li:hover ul li a {
display:block;
background:#6eac7d;
color:#ffffff;
border: 1px solid #ffffff;
text-align:left;
}
.menu ul li:hover ul li a:hover {background:#007e3e; color:#ffffff;}
.menu ul li:hover ul li:hover ul {display:block; position:absolute; left:105px; top:0;}
.menu ul li:hover ul li:hover ul.left {left:-105px;}
HTML
Code:
<!-- Begin menu --->
<div class="menu">
<ul>
<li><a class="hide" href="#">HOME</a>
<!--[if lte IE 6]>
<a href="#">HOME
<table><tr><td>
<![endif]-->
<!--[if lte IE 6]>
</td></tr></table>
</a>
<![endif]-->
</li>
<li><a class="hide" href="#">PRODUCTS</a>
<!--[if lte IE 6]>
<a href="#">PRODUCTS
<table><tr><td>
<![endif]-->
<ul>
<li><a href="#" title="Interactive Feeding Guide">Interactive Feeding Guide</a></li>
<li><a href="#" title="Products">Products</a></li>
</ul>
<!--[if lte IE 6]>
</td></tr></table>
</a>
<![endif]-->
</li>
<li><a class="hide" href="#">STOCKISTS</a>
<!--[if lte IE 6]>
<a href="#">STOCKISTS
<table><tr><td>
<![endif]-->
</li>
<li><a class="hide" href="#">ADVICE</a>
<!--[if lte IE 6]>
<a href="#">ADVICE
<table><tr><td>
<![endif]-->
<ul>
<li><a href="#" title="FAQs">FAQs</a></li>
<li><a href="#" title="Factsheets">Fact Sheets</a></li>
<li><a href="#" title="Adult Feeding Guide">Adult Feeding Guide</a></li>
<li><a href="#" title="Puppy Feeding Guide">Puppy Feeding Guide</a></li>
</ul>
<!--[if lte IE 6]>
</td></tr></table>
</a>
<![endif]-->
</li>
<li><a class="hide" href="../mozilla/index.html">NEWS</a>
<!--[if lte IE 6]>
<a href="#">NEWS
<table><tr><td>
<![endif]-->
<ul>
<li><a href="#" title="Curent News">Current News</a></li>
<li><a href="#" title="Archive">Archive</a></li>
</ul>
<!--[if lte IE 6]>
</td></tr></table>
</a>
<![endif]-->
</li>
<li><a class="hide" href="#">CONTACT</a>
<!--[if lte IE 6]>
<a href="#">CONTACT
<table><tr><td>
<![endif]-->
<ul>
<li><a href="#" title="Links">Links</a></li>
</ul>
<!--[if lte IE 6]>
</td></tr></table>
</a>
<![endif]-->
</li>
</ul>
</div>
<!--- End menu -->
Can anyone tell me what changes I need to make to the code to achieve the same look as the first menu image?
Thanks