This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Replies

8
  1. Andrew Misplon Staff 11 years, 13 days ago

    Hi Mindaugas

    Are you able to use your browser’s developer tool to inspect the page source? Here is how:
    https://siteorigin.com/basics/modifying-theme-design-with-custom-css/

    Insert the following under Appearance > Custom CSS:

    /* Menu */
    .main-navigation ul li.menu-item-223 a {
    background: #000;
    color: red;
    }
    .main-navigation ul li.menu-item-223:hover > a {
    background: #fff;
    color: blue;
    }
    .main-navigation ul li.menu-item-33 a {
    background: #000;
    color: red;
    }
    .main-navigation ul li.menu-item-33:hover > a {
    background: #fff;
    color: blue;
    }
    .main-navigation ul li.menu-item-35 a {
    background: #000;
    color: red;
    }
    .main-navigation ul li.menu-item-35:hover > a {
    background: #fff;
    color: blue;
    }
    .main-navigation ul li.menu-item-215 a {
    background: #000;
    color: red;
    }
    .main-navigation ul li.menu-item-215:hover > a {
    background: #fff;
    color: blue;
    }

    Edit as required.

    If you inspect the menu source you’ll see the list item class I’m targeting for each item.

  2. Mindaugas Vaičiūnas 11 years, 12 days ago

    That worked perfect. Thanks!
    What about if I want to add a background image to one of the menu buttons?

  3. Andrew Misplon Staff 11 years, 12 days ago

    For menu icons you can use our built in theme feature or the following plugin that has several icon libraries:

    https://wordpress.org/plugins/menu-icons/

    For a background image, let me know which menu item you want that on and we’ll try help out.

  4. Andrew Misplon Staff 11 years, 12 days ago

    If you take a look at this thread here:

    Thread: Highlight Single Menu Item

    I’ve applied a different background color and hover color to a single menu item. I did that by inspecting the page source and finding the class of the list item (li) of the menu item that I wanted to target. It would be exactly the same except we’d add in a background image property:

    /* Menu */
    .main-navigation ul li.menu-item-358 a {
    background: #000 url("http://imageurl.com") no-repeat;
    color: red;
    }
    .main-navigation ul li.menu-item-358:hover > a {
    background: #000 url("http://imageurl.com") no-repeat;
    color: blue;
    }

    So you’d need to replace 358 with the menu item class number and replace http://imageurl.com with your image url and replace my background and text colors with yours.

  5. Mindaugas Vaičiūnas 11 years, 11 days ago

    I want to change the background of this item: .main-navigation ul li.menu-item-215 a. Thanks

  6. Andrew Misplon Staff 11 years, 10 days ago

    That’ll look something like this:

    /* Menu */
    .main-navigation ul li.menu-item-215 a {
    background: #000 url("http://imageurl.com") no-repeat;
    color: red;
    }
    .main-navigation ul li.menu-item-215:hover > a {
    background: #000 url("http://imageurl.com") no-repeat;
    color: blue;
    }
  7. MJ 9 years, 11 months ago

    To extend this conversation further, however late to the game…can this CSS be applied to one specific page? I tried utilizing the above CSS with each menu item preceded by .page-id-xx

    Example page:
    http://imsone.com/gradrun/kids/
    I want to alter the hover color and secondary (dropdown) menu color background and text to match the color theme of main menu bar color on just this page.

    You can see the homepage and the rest of the site is has a different color theme –
    http://imsone.com/gradrun/

    Thanks!

  8. Andrew Misplon Staff 9 years, 11 months ago

    Definitely. Everything will be prefixed with the page body class. In the case of your example it would be:

    page-id-676

    It looks like you’ve made good progress. Let me know where you stand now and we’ll take it from there :)

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread