- This topic has 7 replies, 4 voices, and was last updated 3 years, 4 months ago by
David.
-
AuthorPosts
-
December 14, 2022 at 2:55 pm #2462174
Javiera
Hi! First of all, thank you so much for this wonderful theme, I use this in every web I make.
I have this website (http://just2023.temp.domains/~complexb/) and I’m trying to change the background color to some elements on the menu.I have products (productos), 3 main categories, and other pages that belong to each category. Now is kind of confusing, I would like to change the background color to the main categories.
I’ve already have this CSS:
#mobile-header {
background-color: #1d2828;
}
div#mobile-menu {
background-color: #1d2828;
}div#mobile-menu a {
color: #fff;
}
@media (min-width: 768px) {
.main-navigation .menu>.menu-item>a:before,
.main-navigation .menu>.current-menu-item:not(.wc-menu-item)>a:before,
.loud-link a:before {
content: “”;
position: absolute;
display: block;
bottom: 1em;
width: 0%;
height: 2px;
background-color: currentColor;
-webkit-transition: 0.3s width ease;
transition: 0.3s width ease;
}.main-navigation .menu>.menu-item:hover>a:before,
.main-navigation .menu>.menu-item.sfHover>a:before,
.main-navigation .menu>.current-menu-item:not(.wc-menu-item)>a:before,
.loud-link a:hover:before {
width: calc(100% – 40px);So maybe when I try to change the colors with the menu-item number, it doesn’t work.
Could you please help me? (sry for my english, is not my first language).
December 14, 2022 at 3:14 pm #2462184Ying
StaffCustomer SupportHi there,
Can you tell me which menu item are you trying to change the background color?
December 14, 2022 at 5:45 pm #2462251Javiera
Yes
– CIBER INTELIGENCIA / INTELIGENCIA OPERATIVA
– INVESTIGACIÓN FORENSE INFORMÁTICA
– INTELIGENCIA MARÍTIMAThose 3.
Thank you.
December 14, 2022 at 6:43 pm #2462267Fernando Customer Support
Hi Javiera,
To clarify, are you trying to change the Background color of the entire sub-menu or just the Elements?
To change the Background color of the entire sub-menu, try adding this CSS through Appearance > Customize > Additional CSS:
div#primary-menu > ul > li:nth-of-type(2) ul { background-color: #ff0000 }Otherwise, try this:
div#primary-menu > ul > li:nth-of-type(2) > ul > li:nth-of-type(1) { background-color: #ff0000 } div#primary-menu > ul > li:nth-of-type(2) > ul > li:nth-of-type(2) { background-color: #00ff00 } div#primary-menu > ul > li:nth-of-type(2) > ul > li:nth-of-type(3) { background-color: #0000ff }Let us know how it goes.
December 15, 2022 at 6:37 am #2462757Javiera
Hi Fernando!
Just the elements. But it doesn’t work.
Maybe I did something wrong.December 15, 2022 at 6:56 am #2462780David
StaffCustomer SupportHi there,
where did you add the CSS? Can you try adding it before ALL other CSS ?
December 15, 2022 at 7:02 am #2462788Javiera
That works! Thank you so much!
December 15, 2022 at 7:28 am #2462829David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.