ZandaClaws ZandaClaws - 1 year ago 80
CSS Question

nav submenu not displaying correctly

So i am working on a small HP for a school project and am kinda stuck with the nav bar. When i hover over "Gallery" the submenu opens and there's the problem:
I am trying and trying but can't seem to find a way to get the backgroundcolor only for the submenu area and not the whole page on the left of it...

I'm sure it's an easy fix but I am struggling atm

here's the jsfiddle:

i think it's something here, but if I change the width and hover over the submenu it doesn't completely change color.

.menu ul {
display: none;
width: 100%;

any ideas?

Answer Source

can you set width for

    .menu ul {
  list-style: none;
  background: #7ebc71;
  padding: 0;
  position: absolute;
  top: 100%;


 .menu ul li a:hover {
  background: #557F4C;
  width :80px;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download