[Resolved] Custom css in menu item not working

Home Forums Support Custom css in menu item not working

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #341587
    Faye

    Hi there,

    This is on my site fivepixels.co.uk – I’ve added a custom css class called ‘clientlogin’ to a menu item (under appearances->menu). The menu item is called “Client login”.

    Then I’ve added
    .clientlogin {
    color:#ff77od;
    }

    to custom css, but the menu item stays white (which is what I have set it to using GPs color add on).

    How can I get the colour to change for a single menu item?

    I’m sure this is simple, but it’s getting late and I’ve been staring at it for ages… any help much appreciated.

    Have I explained that properly? Please ask if you have no idea what I mean.

    Thank you!!
    Faye.

    GeneratePress 1.3.48
    GP Premium 1.3.1
    #341606
    Leo
    Staff
    Customer Support

    Hi there,

    Menu items are always a bit tricky as the CSS gets overwritten.

    Try changing it to this:

    .main-navigation .main-nav ul li.clientlogin a {
        color: #ff77od;
    }

    Let me know.

    #341613
    Faye

    Nope – the new colour is still crossed out in the inspector and the menu remains white.
    I can’t actually get it to change at all using the css inspector 🙁

    #341622
    Leo
    Staff
    Customer Support

    It says Invalid Property value so check the hex code. If you try this it should work:

    .main-navigation .main-nav ul li.clientlogin a {
        color: #000000;
    }
    #341623
    Faye

    Oh man, I had an ‘o’ in my hex.
    See? Screen blindness. Time for me to go to bed.

    Thank you so, SO much – I’ll be able to sleep now 🙂

    #341625
    Leo
    Staff
    Customer Support
    #341626
    Yael

    I am having the same issue. Was getting ready to post and decided to search first. Tried your suggestion Leo but the styles are overridden by colors in customizer for main menu.

    #341629
    Leo
    Staff
    Customer Support
    #341630
    Yael

    Actually, I’m having a variation on this issue; will open a new thread.

    #341631
    Leo
    Staff
    Customer Support
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.