TanisLinkEragon
11-12-2006, 08:00 PM
Recently I discovered that my navigation menu doesn't work in Internet explorer, or AOL explorer (probably others too). The sub menus dont appear.
<script type="text/javascript">
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;
</script>
<style type="text/css">
ul {
margin: 0;
padding: 27px;
list-style: none;
width: 120px;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 119px;
top: 0;
display: none;
}
ul li a {
display: block;
text-decoration: none;
color: #777;
background: #00035E;
padding: 3px;
border: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */
li:hover ul { display: block; }
</style>
<ul id="nav">
<li><a href="http://www.habbground.com" style="border-left: 1px solid black">Home</a></li>
<li><a href="#">Hotel News</a>
<ul>
<li><a href="http://www.habbground.com/news/usanews.php">USA (.com)</a></li>
<li><a href="http://www.habbground.com/news/usanews.php">UK (.co.uk)</a></li>
<li><a href="http://www.habbground.com/news/usanews.php">AU (.au)</a></li>
<li><a href="http://www.habbground.com/news/usanews.php">CA (.ca)</a></li>
<li><a href="http://www.habbground.com/news/sportsnews.php">Sports</a></li>
</ul>
</li>
<li><a href="#">Media</a>
<ul>
<li><a href="http://habbground.listen2myradio.com/">Radio</a></li>
<li><a href="#">Podcast (coming soon)</a></li>
<li><a href="#">Alterations (coming soon)</a></li>
</ul>
</li>
<li><a href="#">Fun Stuff</a>
<ul>
<li><a href="http://www.habbground.com/Forums">Forums</a></li>
<li><a href="http://www.habbground.com/chat">Chat (coming soon)</a></li>
<li><a href="http://www.habbground.com/Rarevalues">RareValues</a></li>
<li><a href="http://www.habbground.com/pandacam.php">PandaCam</a></li>
</ul>
</li>
<li><a href="#">Staff</a>
<ul>
<li><a href="http://www.habbground.com/staff.php">Staff list</a></li>
<li><a href="http://www.habbground.com/joblist.php">Available jobs</a></li>
<li><a href="http://www.habbground.com/app.php">Job Application</a></li>
<li><a href="http://order.1and1.com/xml/deref?link=http%3A%2F%2Fwebmail.1and1.com&sign=c6cce7de0685562d78e419f029176448">Staff Email Login</a></li>
<li><a href="http://www.habbground.com/Rarevalues/reporter/reporter.php">RareValues Reporter Login</a></li>
<li><a href="http://www.habbground.com/news/cutenews/">Reporter/Editor Login</a></li>
<li><a href="http://www.habbground.com/admin">Admin Area</a></li>
</ul>
</li>
</ul>
can anyone figure out whats wrong?
Oh, and can anyone figure out why theres an annoying black bar in the upper left? <a href="http://www.habbground.com">linky</a>
also, how can I keep it at the top of the page, so it doesnt center itself?
<script type="text/javascript">
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;
</script>
<style type="text/css">
ul {
margin: 0;
padding: 27px;
list-style: none;
width: 120px;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 119px;
top: 0;
display: none;
}
ul li a {
display: block;
text-decoration: none;
color: #777;
background: #00035E;
padding: 3px;
border: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */
li:hover ul { display: block; }
</style>
<ul id="nav">
<li><a href="http://www.habbground.com" style="border-left: 1px solid black">Home</a></li>
<li><a href="#">Hotel News</a>
<ul>
<li><a href="http://www.habbground.com/news/usanews.php">USA (.com)</a></li>
<li><a href="http://www.habbground.com/news/usanews.php">UK (.co.uk)</a></li>
<li><a href="http://www.habbground.com/news/usanews.php">AU (.au)</a></li>
<li><a href="http://www.habbground.com/news/usanews.php">CA (.ca)</a></li>
<li><a href="http://www.habbground.com/news/sportsnews.php">Sports</a></li>
</ul>
</li>
<li><a href="#">Media</a>
<ul>
<li><a href="http://habbground.listen2myradio.com/">Radio</a></li>
<li><a href="#">Podcast (coming soon)</a></li>
<li><a href="#">Alterations (coming soon)</a></li>
</ul>
</li>
<li><a href="#">Fun Stuff</a>
<ul>
<li><a href="http://www.habbground.com/Forums">Forums</a></li>
<li><a href="http://www.habbground.com/chat">Chat (coming soon)</a></li>
<li><a href="http://www.habbground.com/Rarevalues">RareValues</a></li>
<li><a href="http://www.habbground.com/pandacam.php">PandaCam</a></li>
</ul>
</li>
<li><a href="#">Staff</a>
<ul>
<li><a href="http://www.habbground.com/staff.php">Staff list</a></li>
<li><a href="http://www.habbground.com/joblist.php">Available jobs</a></li>
<li><a href="http://www.habbground.com/app.php">Job Application</a></li>
<li><a href="http://order.1and1.com/xml/deref?link=http%3A%2F%2Fwebmail.1and1.com&sign=c6cce7de0685562d78e419f029176448">Staff Email Login</a></li>
<li><a href="http://www.habbground.com/Rarevalues/reporter/reporter.php">RareValues Reporter Login</a></li>
<li><a href="http://www.habbground.com/news/cutenews/">Reporter/Editor Login</a></li>
<li><a href="http://www.habbground.com/admin">Admin Area</a></li>
</ul>
</li>
</ul>
can anyone figure out whats wrong?
Oh, and can anyone figure out why theres an annoying black bar in the upper left? <a href="http://www.habbground.com">linky</a>
also, how can I keep it at the top of the page, so it doesnt center itself?