2

I am working on a pretty simple menu with just one level of submenu items. I have managed to get the styling as I want it, only that once the parent item is selceted (it displays a background image)te submenu items then also display that background image, which shouldn;t happen.

Here is my css

#fav-nav .navigation li a:hover,
#fav-nav .navigation li.active a{
  color: #fff; 
background: url(../../../images/menu-back.png) no-repeat top; 

}

#fav-nav .nav-child li a:hover,
#fav-nav .nav-child li a:active  {

background-image: none;
color: #fff;

}

Here is the html, sorry it's out of a joomla site, I hope I got all the relevant info here.:

<div class="navigation">
<div class="moduletable">
<ul class="nav menu">
<li class="item-102 deeper parent"><a href="#">FENCING</a>
<ul class="nav-child unstyled small">
<li class="item-106"><a href="#">Fence Panels</a></li>
<li class="item-107"><a href="#">Fence Posts</a></li>
<li class="item-108"><a href="#">Gates</a></li>
<li class="item-109"><a href="#">Gate Furniture</a></li></ul></li>
<li class="item-103 current active">
<a href="/noah/index.php/sawn-timber">TIMBER</a></li></ul>

</div>
                                        </div>
                                     </div>

Any help would be really appreciated. Thanks

1 Answers1

0

Make the following changes in your css

#fav-nav .nav-child li > a:hover,
#fav-nav .nav-child li > a:active  {
   background-image: none;
   color: #fff;
}
amol
  • 1,535
  • 9
  • 10