Mobile Menu Color based on current project/page
-
-
Hey! Here is some CSS :D
/*top bar*/ .navbar{ background-color:rgba(255,255,255,0.5); border-bottom-color: green; } /*burger icon*/ .burger span, .burger span:before, .burger span:after{ background-color: pink; } /*menu points border*/ nav.primary li a{ border-bottom-color: yellow; } /*menu points text*/ nav.primary a{ color: aqua; } /*menu points background*/ nav.primary li>a{background-color:rgba(255,0,255,0.5)} /*current menu point*/ nav.primary li.current-menu-item>a{background-color:rgba(0,0,255,0.5)}Of course you need to put your page specific selector in front of each selector above. So it would be:
body[data-type="page"][data-id="20"] .burger span:before, body[data-type="page"][data-id="20"] .burger span:after{ background-color: pink; } -
Hey! Here is some CSS :D
/*top bar*/ .navbar{ background-color:rgba(255,255,255,0.5); border-bottom-color: green; } /*burger icon*/ .burger span, .burger span:before, .burger span:after{ background-color: pink; } /*menu points border*/ nav.primary li a{ border-bottom-color: yellow; } /*menu points text*/ nav.primary a{ color: aqua; } /*menu points background*/ nav.primary li>a{background-color:rgba(255,0,255,0.5)} /*current menu point*/ nav.primary li.current-menu-item>a{background-color:rgba(0,0,255,0.5)}Of course you need to put your page specific selector in front of each selector above. So it would be:
body[data-type="page"][data-id="20"] .burger span:before, body[data-type="page"][data-id="20"] .burger span:after{ background-color: pink; }@arminunruh said:
/menu points text/
nav.primary a{
color: aqua;
}/menu points background/
nav.primary li>a{background-color:rgba(255,0,255,0.5)}Thank you so much Armin! My code was a little bit messy...
Could you help me with something else?I am trying to make the mobile navbar with transparent background (the content starting at 0vh) and when clicking the burger the project titles would appear fullscreen with black background.
I am having some issues with the last part...
Can you help me?Thanks ;)
-
hey daniel!
Hmm this is not really easily possible :/
But it's a nice idea and I might include more options for mobile menus one day -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login