Menu.css
div.menuobject
{
}
div.menu
{
float: left;
margin-left: 10px;
}
div.menu div.menudrop
{
display: none;
}
div.menu:hover div.menudrop, div.menu.over div.menudrop, div.menudrop div.menudropitem:hover
{
display: block;
}
div.menudrop
{
width: auto;
border: solid 1px black;
border-width: 1px 1px 1px 1px;
background-color: #FFFFFF;
margin: 0px 0px 0px 0px;
position: absolute;
top: 53px;
}
div.menudropitem
{
width: auto;
height: auto;
}
div.menudropitem:hover
{
}
a
{
color : #818181;
font-family : Verdana;
font-size : 12px;
display:block;
margin: 0px 5px 5px 5px;
}
a:hover
{
color: #80ABCA;
}
Eksempel på menu
<div class="menuobject" id="menuobject">
<div class="menu">
<div><a href="#">Nyheder</a></div>
<div class="menudrop">
<div class="menudropitem"><a href="#">Forside</a></div>
<div class="menudropitem"><a href="#">Nyheder</a></div>
</div>
</div>
</div>
Dette script skal du bruge for at få det til at virke i IE
<script>
startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("menuobject");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[SKRIV_i_HER!];
if (node.nodeName=="DIV") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
</script>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GED d- s: a--- C++ U? P L+ E? W++ N? o? K- w
O? M? V? PS PE? Y? PGP++ t 5? X+ R tv+ b+ DI? D+
G e-- h! !r y--
------END GEEK CODE BLOCK------
[Redigeret d. 29/06-05 22:06:44 af Jonas (Decko)][Redigeret d. 29/06-05 22:07:10 af Jonas (Decko)]