logo

This is an old version of this answer!

Return to the current answer
The answer above won't work because what you are looking for (I believe) is a hover menu, such that the child pages appear only when you hover over the top level menu item. To do this: use a code like the one below:

For the CSS:

.navigation {
text-align: left;
height: 20px;
font-size: 1.0em;
float: right;
width: 100%;
}

.navigation ul {
margin: 0;
padding: 0;
list-style: none;
height: 32px;
text-transform: uppercase;
}
.navigation ul li {
position: relative;
float: left;
height: 100%;
font: 12px Verdana #fff;
}
.navigation li ul {
position: absolute;
top: 25px;
left: 5px;
display: none;
padding-left: 5px;
z-index: 1000;
height: auto;
background: #000;
}
.navigation li ul li ul {
position: absolute;
left: 200px;
top: 0;
}
.navigation li ul li {
width: 200px;
}

.navigation ul li a {
display: block;
text-decoration: none;
padding:5px 5px 5px 0;
}

/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */

.navigation li:hover ul {
display: block;
}
.navigation li:hover ul li ul {
display: none;
}
.navigation li ul li:hover ul {
display: block;
}


For the html structure:


<ul class="navigation">
<li>Link</li>
<li>Link with child page
<ul>
<li>child link</li>
<li>child link 2</li>
</ul>
</li>
</ul>
</ul>

Pippin Williamson | 07/23/10 at 3:09pm

This is an old version of this answer!

Return to the current answer