tktrn99
02-02-2007, 01:17 AM
OK guys, I'm still fairly new at this, so please be patient. I have built a drop down menu that works fine in IE7 and FF, but I cannot get the submenus to appear in EI6. I have found on the web various problems that would cause this, but can't find a solution - I've edited, and re-edited with no use. Any help would be great!
Code follows:
<!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>
<link href="/styles/front.css" rel="stylesheet" type="text/css" />
<ul id="div">
<style>
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
</style>
<title>Simply My Sims</title>
</head>
<body>
<div id="wrapper">
<div id="header">
<img src="/images/head.jpg" />
<h1>» Simply My Sims « </h1>
<h2>My little piece of the Sims 2 world...</h2>
</div>
<p> </p>
<p> </p>
<div id="nav">
<ul>
<li><a href="/" title="home">Home</a>
<ul>
<li><a href="/aboutme.html" title="aboutme">About Me</a></li>
</ul>
</li>
<li><a href="/" title="challenges">Challenges</a>
<ul>
<li><a href="/legacy/intro.html" title="legacy">Whitmore Legacy</a></li>
<li><a href="/dhw/intro.html" title="dhw">Desperate Housewife</a></li>
<li><a href="http://tktrn99.blogsome.com/" title="widow">Black Widow</a></li>
<li><a href="http://tktrn99-twins.blogspot.com/" title="twins">Twin Experiment</a></li>
</ul>
</li>
<li><a href="/" title="links">Links</a>
<ul>
<li><a href="/links/stories.html" title="stories">Sim Stories</a></li>
<li><a href="/links/cc.html" title="cc">Custom Content</a></li>
</ul>
</li>
</ul>
</div>
</div>
</body>
</html>
CSS:
body {
font-family: Georgia, "Times New Roman", Times, serif;
background:url(/images/mistytil.jpg);
text-align: left;
}
#wrapper {
width: 800px;
margin: 0 auto;
padding: 0;
text-align: left;
background-color: #FFFFFF;
}
#header {
color: #C71585;
text-align: center;
height: 200px;
font-family: DiMurphic;
}
#header img {
position: relative;
text-align: left;
float: left;
}
#nav {
border: 5px #6495ED solid;
width: 150px;
}
#nav ul {
margin: 0;
padding: 0;
list-style: none;
width: 150px;
border-bottom: 1px solid #ccc;
}
#nav ul li {
position: relative;
}
#nav li ul {
position: absolute;
left: 145px;
top: 0;
display: none;
}
#nav ul li a {
display: block;
text-decoration: none;
color: #FFFFFF;
background: #4682B4;
padding: 5px;
border: 1px solid #6495ED;
border-bottom: 0;
}
#nav li:hover ul, li.over ul {
display: block;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */
#main-content {
border: 5px #A0522D solid;
padding: 50px;
}
#main-text {
border: 5px #DAA520 dashed;
}
#footer {
background-color: #DEB887;
border: 5px #808080 solid;
text-align:center;
}
Code follows:
<!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>
<link href="/styles/front.css" rel="stylesheet" type="text/css" />
<ul id="div">
<style>
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
</style>
<title>Simply My Sims</title>
</head>
<body>
<div id="wrapper">
<div id="header">
<img src="/images/head.jpg" />
<h1>» Simply My Sims « </h1>
<h2>My little piece of the Sims 2 world...</h2>
</div>
<p> </p>
<p> </p>
<div id="nav">
<ul>
<li><a href="/" title="home">Home</a>
<ul>
<li><a href="/aboutme.html" title="aboutme">About Me</a></li>
</ul>
</li>
<li><a href="/" title="challenges">Challenges</a>
<ul>
<li><a href="/legacy/intro.html" title="legacy">Whitmore Legacy</a></li>
<li><a href="/dhw/intro.html" title="dhw">Desperate Housewife</a></li>
<li><a href="http://tktrn99.blogsome.com/" title="widow">Black Widow</a></li>
<li><a href="http://tktrn99-twins.blogspot.com/" title="twins">Twin Experiment</a></li>
</ul>
</li>
<li><a href="/" title="links">Links</a>
<ul>
<li><a href="/links/stories.html" title="stories">Sim Stories</a></li>
<li><a href="/links/cc.html" title="cc">Custom Content</a></li>
</ul>
</li>
</ul>
</div>
</div>
</body>
</html>
CSS:
body {
font-family: Georgia, "Times New Roman", Times, serif;
background:url(/images/mistytil.jpg);
text-align: left;
}
#wrapper {
width: 800px;
margin: 0 auto;
padding: 0;
text-align: left;
background-color: #FFFFFF;
}
#header {
color: #C71585;
text-align: center;
height: 200px;
font-family: DiMurphic;
}
#header img {
position: relative;
text-align: left;
float: left;
}
#nav {
border: 5px #6495ED solid;
width: 150px;
}
#nav ul {
margin: 0;
padding: 0;
list-style: none;
width: 150px;
border-bottom: 1px solid #ccc;
}
#nav ul li {
position: relative;
}
#nav li ul {
position: absolute;
left: 145px;
top: 0;
display: none;
}
#nav ul li a {
display: block;
text-decoration: none;
color: #FFFFFF;
background: #4682B4;
padding: 5px;
border: 1px solid #6495ED;
border-bottom: 0;
}
#nav li:hover ul, li.over ul {
display: block;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */
#main-content {
border: 5px #A0522D solid;
padding: 50px;
}
#main-text {
border: 5px #DAA520 dashed;
}
#footer {
background-color: #DEB887;
border: 5px #808080 solid;
text-align:center;
}