I am trying to create lists with sublists where the sub lists are hidden. My next step is to make it so a user can add but first things first. The XHTML and CSS should be working together yet the sublists are not hiding, any ideas? XHTML is here and CSS is below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Alstom page 2</title>
<link rel="stylesheet"
type="text/css"
href="menu css sheet.css" />
</head>
<body>
<center> <img src="alstom-logo.gif" alt="Alstom Logo" height = "168" width = "400" border="none" /> </center>
<p> </p>
<p> </p>
<div id = "menu">
<ul>
<li>menu
<ul>
<li>Option a</li>
<li>Option b</li>
<li>Option c</li>
<li>Option d </li>
</ul>
</li>
<li>history
<ul>
<li>Option 1</li>
<li>Option 2</li>
<li>Option 3</li>
</ul>
</li>
</ul>
</div>
</body>
</html>
and the css:
/* CSS Document */
/* create float menu for webpage*/
#menu ul {margin-left: -2.5em; }
#menu li {
list-style-type: none;
border: black solid 1px;
float:left;
width: 10em;
background-color:#cccccc;
text-align:center; }
#menu a {
color: black;
text-decoration: none;
display: block; }
#menu a:hover {
background-color: white; }
menu li ul {
display: none; }
menu li:hover > ul {
display: block;
margin-left: -2em; }