Applying Hover Color To Menu With CSS

  • ytadvisers
  • Newbie
  • Newbie
  • ytadvisers
  • Posts: 10
  • Loc: Kentucky

Post 3+ Months Ago

Hello,
cannot figure out the correct CSS to fix the link hover color. I have been able to fix it on the current page, but not for the rest of the links.
CSS Code i have tried:
Code: [ Select ]
#navigation .sf-menu > .current-menu-item > a, #navigation .sf-menu > .current-menu-item > a:hover {
  background: red;
  color: #fff;
  font-weight: bold;
}
  1. #navigation .sf-menu > .current-menu-item > a, #navigation .sf-menu > .current-menu-item > a:hover {
  2.   background: red;
  3.   color: #fff;
  4.   font-weight: bold;
  5. }


Thanks for the suggestions.
Moderator Remark: His link is on his profile page.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9193
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Currently you have the following rule that is being applied:

CSS Code: [ Select ]
#navigation .sf-menu > li.sfHover > a,
#navigation .current-menu-parent > a,
#navigation .current-menu-parent > a:hover {
   color:#192835;
}
  1. #navigation .sf-menu > li.sfHover > a,
  2. #navigation .current-menu-parent > a,
  3. #navigation .current-menu-parent > a:hover {
  4.    color:#192835;
  5. }


You would need to use that same rule after that one is specified, or something more specific if you want to apply the rules you listed. So something like this:

CSS Code: [ Select ]
#navigation .sf-menu > li.sfHover > a,
#navigation .current-menu-parent > a,
#navigation .current-menu-parent > a:hover {
   background: red;
   color: #fff;
   font-weight: bold;
}
  1. #navigation .sf-menu > li.sfHover > a,
  2. #navigation .current-menu-parent > a,
  3. #navigation .current-menu-parent > a:hover {
  4.    background: red;
  5.    color: #fff;
  6.    font-weight: bold;
  7. }
  • sasamarkovicks1
  • Born
  • Born
  • sasamarkovicks1
  • Posts: 1

Post 3+ Months Ago

are you using firebug

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 25 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.