• I’ve added a class (in WP menu) to the last item in the main top level nav, but I still can’t target it to change the CSS!

    If I try this:
    #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:last-child
    it targets the last two items.

    How can I target this single nav item?

Viewing 1 replies (of 1 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Damsel,

    When you add a custom class to a menu item, it’s prepended with ‘mega-‘.

    If you add the class ‘last’, your CSS needs to target ‘.mega-last’.

    Regarding using :last-child, I think that would need to go onto li.mega-menu-item rather than a.mega-menu-link.

    Regards,
    Tom

Viewing 1 replies (of 1 total)
  • The topic ‘Target Last Main Menu Item’ is closed to new replies.