Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Mobile Menu Color based on current project/page

Mobile Menu Color based on current project/page

Scheduled Pinned Locked Moved General Discussion
5 Posts 2 Posters 1.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • dafvD
    dafvD
    dafv
    wrote on last edited by arminunruh
    #1

    Daniel asked how to change mobile menu colors based on the current page. I accidentally edited his post sry
    Armin

    1 Reply Last reply
    0
    • arminunruhA
      arminunruhA
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      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;
      }
      
      dafvD 1 Reply Last reply
      0
      • arminunruhA arminunruh

        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;
        }
        
        dafvD
        dafvD
        dafv
        wrote on last edited by
        #3

        @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 ;)

        1 Reply Last reply
        0
        • arminunruhA
          arminunruhA
          arminunruh
          Global Moderator
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • dafvD
            dafvD
            dafv
            wrote on last edited by
            #5

            that would be awesome ;)

            1 Reply Last reply
            0

            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
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            Online Users
            Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
            laytheme.com
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Search