• Hi,

    I’ve been trying to add an icon to my secondary menu.
    I’m using Virtue theme, which I really like btw!!

    Here the CSS Class I used (I copied and pasted in theme options / custom CSS and then added to the menu item):

    .home-link-icon a{
    padding-left: 30px !important;
    background-image: url(images/home.png);
    background-position: left;
    background-repeat: no-repeat;
    }

    am I doing something wrong?
    Thanks for your help

Viewing 3 replies - 1 through 3 (of 3 total)
  • Whenever you post a question, please include a link to your site. It makes it easier to see what the problem might be. Thank you.

    Thread Starter kunstudio17

    (@kunstudio17)

    Sorry but my site is not online yet. I cannot post the link.

    Anyways, the site I’m building is very similar (same theme etc) with this other.
    Let’s say I want to add icons next to the menu items of this one:

    https://www.s-tream.com/

    Meaning that, next to “INICIO” I want to add the home icon, for exemple.

    Thanks

    OK, if I were to add an icon to the left of the INICIO menu item, here is how I would do it:

    #nav-main ul.sf-menu a {
        display: inline-block;
        padding-left: 5px;
    }
    .menu-inicio::before {
       content: url(https://pc4s.googlecode.com/svn/trunk/images/star-icon.png);
       display: inline-block;
    }

    Use the ::before pseudo-element to place your icon before the menu item.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Virtue Theme can't add icon to custom menu item by CSS Class’ is closed to new replies.