[ En sidste ting.
Kan du fortælle mig hvordan jeg fjerner border på øverste niveau? Uden at fjerne den på undermenuerne. ]
Sådan her???
<!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><title>Untitled Page</title>
<style type="text/css">
ul {
margin: 0;
padding: 0;
list-style: none;
width: 150px;
float : left;
}
ul.nav ul {
width: 148px;
border: 1px solid #ccc;
}
ul li {
position: relative;
}
li ul {
position : relative;
display: none;
}
li:hover ul, li.over ul {
display: block;
}
ul li a {
display: block;
text-decoration: none;
color: #777;
background: #fff;
padding: 5px;
border-bottom: 0;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */
</style>
<script type="text/javascript">
function startList(tmptype) {
navRoot=tmptype;
for (i2=0; i2<navRoot.childNodes.length; i2++) {
node = navRoot.childNodes[i2];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
window.onload=function(){
if(document.all&&document.getElementById){
navRoots = document.getElementsByTagName("ul");
for(i=0;i<navRoots.length;i++){
if(navRoots[i].className=="nav")startList(navRoots[i]);
}
}
}
</script>
</head>
<body>
<ul class="nav">
<li><a href="#">Test 1</a>
<ul>
<li><a href="#">Test 3</a></li>
<li><a href="#">Test 4</a></li>
<li><a href="#">Test 5</a></li>
</ul>
</li>
</ul>
<ul class="nav">
<li><a href="#">Test 2</a>
<ul>
<li><a href="#">Test 3</a></li>
<li><a href="#">Test 4</a></li>
<li><a href="#">Test 5</a></li>
</ul>
</li>
</ul>
</body></html>