Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS changing the colour on an individual nav item in wordpress

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #294343
    emmapap
    Participant

    hi
    I am trying to change the colour of an individual nav item in wordpress from black to gold (the rest of the nav items are to be black)
    this is the css code I am using
    .main-nav > li.current-menu-item > a, .main-nav .current-menu-item a, .main-nav > li > a:hover, .main-nav > li.active > a, .main-nav > li.current > a {color: #cc9966 !important;}

    this works but only if you are on a current item. I want it to always be the colour #cc9966. Also it is not working in all browsers?

    Has anyone any ideas?

    I tried this bit of code out but it changed all the menu items to the colour #cc9966

    #menu-item-3576 .main-header .main-navigation > li > a, .main-nav > li > a {
    font-family: Lato, Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.3px;
    line-height: 70px;
    text-align: left;
    text-transform: none;
    color: #cc9966 !important;
    }

    the site is http://materialiseinteriors.com

    any ideas?

    #294355
    Paulie_D
    Member

    You haven’t said WHICH link is suppsoed to be that color.

    However, I’d suggest a NEW rule

    #menu-item-3576 a {
        color: gold;
    }
    
    #294361
    emmapap
    Participant

    hey that worked! it was the book your free consultation! thanks – I’ve been scratching my head over this!!

    #294476
    emmapap
    Participant

    hi
    just another issue with this – the colour change isn’t for some reason showing on the homepage of the site but it is showing on all the other pages of the site – what would that be? for example you cant see it on http://materialiseinteriors.com/ but you can see it on http://materialiseinteriors.com/welcome/ Do you know why that would be?

    #294521
    mixtape888
    Participant

    Well thank for your guide sir!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.