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

    Dear Sir,

    I use this code to change the background color of a menu item on the main navigation bar (this works):

    .sub-menu li#menu-item-5928 a {
    background: #0094b2 !important;
    }

    But what CSS would I use to change the background color on the same item within the mobile menu? As the CSS above doesn’t change the mobile item background color.

    Thanks SO MUCH for any help :)

    Best wishes,
    Christopher Skelton

    #886697

    Hey kelsangchodor,

    Please provide a link to the site in question so we can inspect this page.

    Best regards,
    Jordan Shannon

    #886711

    Hi,
    Sorry forgot to include:

    Thank you!

    #886868

    Hi Christopher,

    Are you making the menu items white to be invisible?
    Image 2017-12-09 at 16.01.41.png

    And it’s a class not an id:

    
    .sub-menu li.menu-item-5928 a {
        background: #0094b2 !important;
    }
    

    If you need further assistance please let us know.
    Best regards,
    Victoria

    #886877

    Hi Victoria,

    To be clear what I would like.

    I would like the background color of a single menu-item (both on desktop and mobile menu) to be #0094be

    The css above works perfectly on desktop – non-responsive menu – it was given to me by one of your colleagues. I don’t want to change that – it works absolutely fine :)

    However, this CSS *does not* change the same menu-item background on the mobile menu. I want this to be the same background color too : #0094be

    I need to know what css to use to change the color of the background of a single menu item on mobile menu.

    Thanks for your help,

    Christopher Skelton.

    #886890

    Hi Christopher,

    The css I gave you above works with the mobile menu, please try it.

    Best regards,
    Victoria

    #886893

    Hi Victora,

    Sorry – i didn’t notice the subtle difference of a “#” to a “.”

    I created two entries of CSS for each menu item – one for changing color on desktop and the one above you suggested to change background of mobile menu.

    Does that sound correct?

    Thanks for your time,

    Best wishes,
    Christopher Skelton.

    #887303

    Hi Christopher,

    Yes, that is correct. Does the code do what you need?

    Best regards,
    Victoria

    #887342

    Yes, Its perfect.

    Thanks for your time Victoria. Much appreciated.

    Best wishes,

    Christopher.

    #887626

    Hi,

    If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Change background color of menu item on MOBILE’ is closed to new replies.