- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
hi guys, noob here
in here menu highlight background
http://goo.gl/yfC1VZ
but in here it disappears
http://goo.gl/Claf6j
so i tried this
.sf-menu li.current-page-ancestor a {
background: #000;
}
and also tried this
.single-portfolio .menu-item-42 li a:hover{
background: #000;
}
but doesn’t work… any idea what am i doing wrong? thx in advance!
You want the current page to be highlighted?
The :hover
attribute is only when the cursor is over it.
Check out this topic: https://css-tricks.com/forums/topic/can-highlight-current-page-navbar/
edit: i didnt see the 2 comments posted to this query when i hit submit. sorry to post over you both.
I think you’re right targeting .single portfolio. Have you tried
.single-portfolio .menu-item-42 a {
background: #000;
}
.single-portfolio .menu-item-42 li a:hover{
background: #000;
}
This won’t work because .menu-item-42 is the li.
superfish is for the menu. it has its own stylesheet. You have a few stylesheets styling the list item which makes things a little more awkward but have you looked at this:
/* line 218 style-custom.css */
.sf-menu li.current-menu-ancestor a,
.sf-menu li.current-menu-item a,
.sf-menu li.current-post-ancestor a {
color: #999;
background: black;
}
/* line 233 style-custom.css */
.single-portfolio .menu-item-42 a {
color: #6D6D6D;
}
You have no background color declared on line 233. Also, here’s another selector you could try
.single-portfolio .sf-menu li.menu-item-42 a {
color: #999;
background: #000;
}