Tagged: color background, menu
-
AuthorPosts
-
January 14, 2024 at 3:52 pm #1430053
In the main menu I want to change the background color of each item individually, as in the following link: https://www.birdsafephilly.org/
- This topic was modified 11 months, 1 week ago by Rocuant.
January 14, 2024 at 4:31 pm #1430061Hey Rocuant,
First enable the css classes in the menu items by selecting this option in the menu screen options:
Then add a custom class like “red” to the menu item:
Then add CSS for the menu background color in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field like this:.red { background-color: red; }
If you want the text color to also be different, like white, add this:
.red .avia-menu-text { color: white; }
This is the expected results:
Then do this for each item.Best regards,
MikeJanuary 14, 2024 at 5:36 pm #1430069It works perfect with name colors, but I´d like to add personalized colors like #F6BFCA, ¿it is possible?
- This reply was modified 11 months, 1 week ago by Rocuant.
January 14, 2024 at 6:04 pm #1430072Hi,
Yes, use a unique class name and add your hex color code to the css, like this:.my-hex-color { background-color: #F6BFCA; }
Best regards,
MikeJanuary 14, 2024 at 6:49 pm #1430074¿What do you mean by class name?. I have added to “Quick CSS” .my-hex-color { background-color: #F6BFCA;}, but in “Menu structure”, CSS classes, instead of name colors, ¿what should I add? in order to have a different color for each menu item
January 14, 2024 at 7:01 pm #1430076January 14, 2024 at 7:37 pm #1430083This reply has been marked as private.January 14, 2024 at 8:12 pm #1430085Hi,
Please note that each class needs to be unique, like this:.my-hex-color-one { background-color: #F6BFCA; } .my-hex-color-two { background-color: #F2DFD7; } .my-hex-color-three { background-color: #F6BFCA; } .my-hex-color-four { background-color: #F2DFD7; } .my-hex-color-five { background-color: #F6BFCA; } .my-hex-color-six { background-color: #F2DFD7; }
and the class that you add into the menu Clases CSS should match the color that you want.
Best regards,
MikeJanuary 15, 2024 at 1:12 am #1430101It works perfect! Thank you very much!
January 15, 2024 at 4:48 am #1430103 -
AuthorPosts
- The topic ‘Menu items background color’ is closed to new replies.