1. Forsiden
  2.  » Navigation
  3.  » Dropdown menu artikel

Navigationsbjælken i fuld bredde

Kolorering af baggrund

Bemærk hvorledes undermenuen til menupunktet Test menu yderst til højre forsvinder, når musen føres ned over undermenuen. Jeg beskriver remediet i eksempel 12a.

div#navbar {
  background-color:#505c5a;
  float:left; 
  width:100%; /* tilføjelse */
  border-bottom:1px solid black;/* tilføjelse */
  margin:-1px 0 0 0;}

div#navbar { 
  font-size:80%;font-family:arial,sans-serif;font-weight:bold; }
div#navbar ul {
  background-color:#505c5a;
  margin:0; padding:0; list-style:none;
  border-top: 1px solid black; 
  color:#fff;}
div#navbar li { 
  position:relative; 
  width:10em; 
  line-height:1em;
  margin:0; padding:0; 
  list-style:none; float:left;
  border-bottom:none;
  border-right:1px solid black;}
div#navbar li a {
  color:#fff;
  background-color:#505c5a;} 
div#navbar li:hover a {
  background-color:#939d92;
  color:#fff;}
div#navbar li.sub a {
  background-image:url(arrdndark.png);
  background-position:95% center;
  background-repeat:no-repeat;
}
div#navbar li.sub a:hover {
  background-image:url(arrdnlight.png);
  background-position:95% center;
  background-repeat:no-repeat;
  }
div#navbar li.sub li a {
  background-image:none;
  background-color:#505c5a;
  color:#fff;}
div#navbar li.sub li a:hover {
  background-image:none;
  background-color:#939d92;
  color:#fff;}
div#navbar li.sub li.sub a {
  background-image:url(arrdndark.png);
  background-position:95% center;
  background-repeat:no-repeat;
  background-color:#505c5a;
  color:#fff;}
div#navbar li.sub li.sub ul.niveau3 li a {
  background-image:none;}
div#navbar li.sub li.sub a:hover {
  background-color:#939d92;
  color:#fff;}
div#navbar ul li a { display:block; text-decoration:none; 
  padding:0.25em 0 0.25em 0.5em; width:9.5em; margin:0;   }
div#navbar>ul a {width:auto;}
div#navbar ul ul {display:none;position:absolute;width:10em;}
div#navbar ul ul li {border-bottom:1px solid black;
  border-left:1px solid black;margin-left:-1px;}
div#navbar ul.niveau1 li.sub:hover ul.niveau2 {border-top:1px solid black;}
div#navbar ul.niveau1 li.sub:hover ul.niveau2,
div#navbar ul.niveau2 li.sub:hover ul.niveau3 {display:block;}
div#navbar ul.niveau2 {top:1.5em; left:0;}
div#navbar ul.niveau3 {top:-1px; left:9em;border-top:1px solid black;}

Maecenas accumsan libero sit amet libero. Sed velit ligula, vulputate sit amet, commodo non, ultrices vel, velit. Donec vitae risus quis erat semper congue. Nunc ornare faucibus enim.

Aenean pretium elit nec velit. Phasellus commodo, nibh at vulputate dapibus, nisl quam venenatis sem, quis ornare nunc nulla ut libero. Aenean ipsum. Fusce lacinia congue mauris. Maecenas non libero. Nullam eget enim. Integer iaculis arcu dictum ligula. Ut neque ipsum, vestibulum ut, interdum at, aliquam vel, felis.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam bibendum tempor nulla. Sed commodo. Aliquam feugiat lorem nec sem. Nullam consequat tristique libero. Suspendisse id erat. Duis ante sem, laoreet nec, nonummy non, posuere at, sapien. Nam porta. Cras sapien tortor, vehicula at, scelerisque quis, consequat at, enim. Fusce quis tortor. Quisque magna. Proin nunc. Phasellus purus metus, tempus a, lobortis in, mollis sed, erat. Nulla facilisi. Curabitur wisi.