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, ul#menu ul {
	padding: 0;
	float: left;
	list-style-type: none;
	font-size: 1em;
}
ul#menu li {
	line-height: 30px;
	width: 125px;
	position: relative;
	background: #f00;
	color: #fff;
	text-align: center;
}
		ul#menu li ul {display: none;}
		ul#menu li:hover ul {
			width: 375px;
			position: absolute;
			top: 0;
			left: 125px;
			display: block;
		}
		ul#menu ul li {float: left;}
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;}