TheVillageIdiot27
Programmer
I am trying to redesign a site navigation system that is currently Table/JavaScript based into a List CSS design.
I am at testing stage and I have got it largely working in Netscape but it doesn't seem to want to know in IE and I am not sure what I am doing wrong.
I currently have
In Netscape all is okay, but in IE I have had to add the the '<br/>' tags to get the sublists to appear underneath and I can't for the life of me find out how to get the li:hover bit to work.
I am very new to CSS to any real depth so any help would be gratefully apprecciated
I am at testing stage and I have got it largely working in Netscape but it doesn't seem to want to know in IE and I am not sure what I am doing wrong.
I currently have
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Menu Test Page</title>
<style>
#menu
{
font-family: Arial, Helvetica, sans-serif;
}
.menu_sublist
{
position: absolute;
}
#menu a, a:visited, a:active
{
color: #004173;
font-weight: bold;
text-decoration: none;
}
#menu a:hover
{
color: #7495BC;
font-weight: bold;
text-decoration: none;
}
#menu ul
{
padding: 0px;
margin: 0px;
}
#menu ul li
{
float: left;
width: 100px;
list-style: none;
padding: 0px;
margin: 0px;
}
#menu ul li a
{
width: 100px;
}
#menu ul li ul
{
list-style: none;
padding: 0px;
margin: 0px;
width: 175px;
position: absolute;
left: auto;
display: none;
}
#menu ul li:hover ul
{
display: block;
}
#menu ul li ul li
{
list-style: none;
padding: 0px;
margin: 0px;
width: 175px;
border: 1px solid #7495BC;
background-color: #FFFFFF;
}
#menu ul li:hover ul li:hover
{
background-color: #7495BC;
}
#menu ul li ul li:hover a, a:visited, a:active, a:hover
{
color: #FFFFFF;
}
</style>
</head>
<body>
<div id="menu">
<ul>
<li>
<a href="#">Item 1</a><br/>
<ul>
<li><a href="#">Sub-Item 1a</a></li>
<li><a href="#">Sub-Item 1b</a></li>
<li><a href="#">Sub-Item 1c</a></li>
</ul>
</li>
<li>
<a href="#">Item 2</a><br/>
<ul>
<li><a href="#">Sub-Item 2a</a></li>
<li><a href="#">Sub-Item 2b</a></li>
<li><a href="#">Sub-Item 2c</a></li>
</ul>
</li>
<li>
<a href="#">Item 3</a><br/>
<ul>
<li><a href="#">Sub-Item 3a</a></li>
<li><a href="#">Sub-Item 3b</a></li>
<li><a href="#">Sub-Item 3c</a></li>
</ul>
</li>
</ul>
</div>
</body>
</html>
In Netscape all is okay, but in IE I have had to add the the '<br/>' tags to get the sublists to appear underneath and I can't for the life of me find out how to get the li:hover bit to work.
I am very new to CSS to any real depth so any help would be gratefully apprecciated