Back to CSS Tips
Preview: what the working site looks like.
The markup
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>     
<div id="container">
        <ul id="menu">
            <li><a href="#">home</a></li>
            <li><a href="#">about</a></li>
            <li><a href="#">films</a>
                <ul>
                    <li><a href="#">legacy</a></li>
                    <li><a href="#">journey</a></li>
                    <li><a href="#">rally</a></li>
                </ul>
            </li>
            <li><a href="#">contact</a></li>
        </ul>
    <!--container--></div>
</body>
</html>
        
The CSS
html, body {
	margin: 0;
	font: 100% "Trebuchet MS", Arial, Helvetica, sans-serif;
	color: #000;
	background: #fc6;
}
#container {
	width: 800px;
	margin: 30px auto;
	background: #999;
	overflow: auto;
}
ul#menu {width: 500px;}
	ul#menu ul {width: 375px;}
		ul#menu, ul#menu ul{
			height: 30px;
			margin: 0;
			padding: 0;
			list-style-type: none;
			font-size: 1em;
			background: #f00;
		}
ul#menu li {
	line-height: 30px;
	width: 125px;
	float: left;
	color: #fff;
	text-align: center;
}
		ul#menu li ul {display: none;}
		ul#menu li:hover ul {display: block;}
ul#menu ul li a {
	width: 125px;
	float: left;
	color: #fff;
}
	ul#menu a{
		display: block;
		text-decoration: none;
		color: #fff;
	}
	ul#menu a:hover,
	ul#menu a:active {background: #00f;}