Page is a not externally linkable
appi2 - 9:08 pm on Jun 25, 2008 (gmt 0)
I've made it centered, which then gives problems with the second level and where it shows on the left of the window. I've added first/last class as its always handy to have (the green and tan colours). Sizes are in em's. Which helps if some blind bat comes along with font size set to massive, the menu doesnt break. Its by no means finished, lots of things to get right and play with. Rather than me typing out lots of comments and why and what for, just ask or even better google ;) Have a play break it, add stuff, remove stuff and learn Anyhoo have fun. <style type="text/css"> body { .wrapper { #nav li { #nav a { #nav a:focus,#nav a:hover,#nav a:active { /*######################## #nav li:hover ul { #nav li li { #nav li ul li a { #nav li li:hover { #nav li ul a:hover{ /*END OF TOP DROP DOWN NAVIGATION MENU*/ </head> <body> ps I just had a play with the adobe spry version. I wanted to cry.
You will need to add a bit of javasript for this to work in IE6.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CSS Dropdown Menu</title>
/*START OF TOP DROP DOWN NAVIGATION MENU*/
* {
margin:0;
padding:0;
}
font-size:100%;
}
background-color: #F7840C;
height:1.4em;
width:100%;
border-bottom:1.4em solid red;
}
/*########################
START First Level of Menu
*/
#nav {
margin:0 auto;
text-align:center;
list-style: none;
width:56.3em;
font-size: 0.8em;
font-family:Arial, Helvetica, sans-serif;
}
float: left;
background-color: #F7840C;
padding: 0;
width:8em;
}
#nav li:hover, #nav li.sfhover, #navsmall li:hover {
background: #fff;
color:#000;
}
color:#FFFFFF;
display: block;
text-align:center;
text-decoration: none;
padding: 0.2em 0;
}
width:8em;
color:#000;
}
/*
END First Level of Menu
#######################*/
START Second Level of Menu
*/
#nav ul{
list-style: none;
position: absolute;
left: -999em;
}
position: absolute;
left:0;
top:auto;
margin-left:50px;
}
float:left;
width:8em;
}
color:#fff;
text-align:center;
text-decoration:none;
padding: 0.2em 0;
}
border:0;
}
text-decoration:underline;
color:#000;
}
.twoline, .twoline a {
width:200px !important;
}
.first {background:green !important;}
.last {background:tan !important;}
</style>
<div class="wrapper">
<ul id="nav">
<li class="first"><a href="#">Big Stuff</a>
<ul>
<li class="first"><a href="#">Item 1.1</a></li>
<li><a href="#">Item 1.2</a></li>
<li class="last"><a href="#">Item 1.3</a></li>
</ul>
</li>
<li><a href="#">Little Stuff</a></li>
<li><a href="#">Stuff We Do</a>
<ul>
<li class="twoline first"><a href="#">Museums & Exhibitions</a> </li>
<li><a href="#">Interiors</a></li>
<li><a href="#">Retail</a></li>
<li><a href="#">Vehicles</a></li>
<li><a href="#">Events</a></li>
<li class="last"><a href="#">Signage</a></li>
</ul>
</li>
<li><a href="#">Our Stuff</a></li>
<li><a href="#">Stuff Others Say</a></li>
<li><a href="#">Tech Stuff</a></li>
<li class="last"><a href="#">Contact Stuff</a></li>
</ul>
</div>
</body>
</html>