WordPress.org

Ready to get started?Download WordPress

Forums

Target specific item in custom menu (5 posts)

  1. AMEEKER
    Member
    Posted 1 year ago #

    Where my CSS fools at? :-) I'm having a heck of a time targeting one specific link in a custom menu to get it to retain styling when it is the current page. http://vasd.angiemeekerdesigns.com/about/contact/ (the page is the "Contact" page), the link is the "Get Help" link in the upper right. You can see that when not the current page, the link itself and its background is totally green. I'd like it to be that way when it's current/active, too. But I'm having trouble targeting it alone.

    I know it links to the same page as another link in the custom menu (under the About dropdown). But I thought you could target individual menu items of a custom menu (this one being #menu-item-169). For some reason though I've not been able to get to the rest of what I need. I thought #dropmenu #menu-item-169 li.current-menu-item > a would do it, but that didn't work.
    Anyone?

  2. Jacob Artman
    Member
    Posted 1 year ago #

    I think this may do the trick. Add this bit of code to:

    .menu-item-169 a

    background: none !important;

    Note that using !important should just be a temporary fix. I'll keep looking for a more specific class to override the current settings.

  3. AMEEKER
    Member
    Posted 1 year ago #

    Ah... that works for me!

  4. AMEEKER
    Member
    Posted 1 year ago #

    So that worked in Chrome, FF and Safari, but not in IE. The theme already has an IE stylesheet and call to it the header - I've tried adding to it but I don't see the changes taking effect. Any thoughts?

  5. WPWebs
    Member
    Posted 1 year ago #

    hi you are using css3 style code and it may not work in IE so you should use simple code like

    #menu-item-169{ background-color: #23A323;} in header IE stylesheet

    [link moderated]

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.