WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Change color of ONE menu item (3 posts)

  1. tankzt
    Member
    Posted 1 year ago #

    I am trying to change the color of the "Schedule a free on-site demo" menu on my site: http://www.industrialcamera.net. I added the following to the style.css file in my theme (business-lite):

    .page-item-91 {
    background-color: #FF0000;
    color: #FFFFFF;
    }

    After adding the code above all it does is put a red bar directly below the menu and does nothing to the actual menu itself. Can anyone help?

    Thanks!

  2. Tammie
    Member
    Posted 1 year ago #

    This style:

    #nav #nav_menu > li > a {
    background: #FBFBFB;
    border-radius: 3px 3px 3px 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    color: #555;
    display: inline-block;
    font-size: 16px;
    line-height: 20px;
    border: 1px solid #AAA;
    cursor: pointer;
    padding: 5px;
    position: relative;
    }

    Would overrule if you just do what you did above.

    What you need to do is something like this:

    #nav #nav_menu > li.page-item-91 > a

    Then do the specific styling.

  3. tankzt
    Member
    Posted 1 year ago #

    That worked perfectly! Thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic