How to Apply CSS to Current Menu Item in Wordprerss

In a wordpress , When you are integrate your HTML to Wordpress the many often face the CSS Problem regarding with the active menu Link.



Wordpress has a Functional based menu display tag.

If you Want to apply effect of CSS to your Current activated menu you have to add css lines to your style.css.

If you want to apply CSS to <li> tag of Navigation

#menu li.current_page_item
{
color:#fff !important;
 background-image: url(images/menuover.jpg) !important;
}

If you Want to apply CSS to <a> tag of Navigation.

#menu li.current_page_item a
{
color:#fff !important;
 background-image: url(images/menuover.jpg) !important;
}
Where #menu is your menu id style. It may be Class, Depending on your css.

Comments