How to Add Custom Class to Individual li Items in (wp_nav_menu) (2 posts)

  1. Shahzad
    Posted 3 years ago #

    Hi there,
    I want to add a css class to the first menu item in wp_nav_menu – as the padding/border for this item needed to be different than the other menu items.
    Any suggestion please! I am already read this function on wordpress.
    but nothing do better and not able to apply a css class in li item... I am worried about this...

  2. Pioneer Web Design
    Posted 3 years ago #

    Use a tool such as Firebug, Chrome Inspect Element, or IE9+ F12 Developer Tools to inspect the menu item's HTML output and CSS...you should see a unique style that will be in the form of:

    <li id=menu-item-number .....

    Create a style for this unique id.

Topic Closed

This topic has been closed to new replies.

About this Topic