background of main menu
-
Hey!
How i can change the background of a main menu?
In the adv settings I can set backgrnd only for additional and loft menus.
I’ve created a texture for it, and I need to place it there.
-
Hello,
You want this to only apply to your primary menu, correct?
You can use this css:#nav-main ul.sf-menu a { background: url(YOUR IMAGE URL); }Just add your url and paste it in your custom css box in theme options > advanced settings.
Hope it helps!Hannah
This determine for each menu item, and what I need is the hole menu line, page width
Hmm, this should apply to the entire menu. Can you post a link?
Ok. I’ll try to show.
I’ve got this texture: http://postimg.org/image/hol73ml8d/
When I code this:
#nav-main ul.sf-menu a {
background: url(YOUR IMAGE URL);
}The result is:
http://postimg.org/image/ufdunclrp/
And what I’m trying to do is:
http://postimg.org/image/73ucbzwvp/
–full width to a homepage.
Hmm. Try adding this instead:
.sf-menu { background: url(YOUR IMAGE URL); padding-bottom: 8px; }Let me know if that works for you!
Hannah
Partially worked, with 13px
http://postimg.org/image/3u70skcjh/
But still not full width, and, the top of the texture is cutted, I imagine that’s height limit somewhere. And may be width.
It’s actually best to use the secondary menu if you want the menu background to be fullwidth.
I can give you the css styling to make the secondary menu look like the primary in that it will be centered:
#nav-second ul.sf-menu>li { width: auto; float: none; display: inline-block; } #nav-second ul.sf-menu { text-align: center; } #nav-second ul.sf-menu>li>a { padding: 10px 20px; }Then you can add the background in the theme options > advanced styling.
Kadence Themes
Something is wrong , because now I can’t set the background image at all in the adv. styling. I can set the color, ok. But when I upload an image, nothing happens. I see it uploaded, saved. But no change in the menu.
Any idea why is so?
Do you have any code in your custom css that could be over-riding?
that’ all I’ve got in the adv settings:
.contentclass { background:rgba(60,27,27,.60); } .contentclass { border:2px solid rgba(05,0,0,.55); border-radius:5px; box-shadow:14px -1px 25px 3px rgba(60,27,27,.55); } .wrap.contentclass { margin:0 auto; max-width:1200px; } .wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea { background-color:rgba(60,27,27,.30); color:#fff; width:50%; border-radius:5px; } .wpcf7 input[type="submit"] { background:rgba(60,27,27,.30); color:#ddb471; border-radius:5px; } #nav-second ul.sf-menu>li { width:auto; float:none; display:inline-block; } #nav-second ul.sf-menu { text-align:center; } #nav-second ul.sf-menu>li>a { padding:10px 20px; }Any chance for a link? That would show me what is going on in the code.
Kadence Themes
Not yet hosted. I’ll come back then with a link.J ust puted a similar color temporary.
Here is a link (redirected, just for not indexing):
As I’ve hosted the page, the problem persists:
I cannot set the background (texture) for secondary menu.
So in the theme options > advanced styling. You’ve set the secondary menu background right. Not the mobile menu? Because from the code it looks like you set the mobile menu background?
Kadence Themes
It’s set in a both.
http://postimg.org/image/4nwog5caf/
http://postimg.org/image/5ql6y7sbd/
But even I unset the mobile menu background, no changes.
The topic ‘background of main menu’ is closed to new replies.
