• Resolved freatz

    (@freatz)


    Hi!
    This web has a lot of information, so I’d like to have the menu fixed on the top of the screen, so you don’t have to scroll up to find the menu. Is that possible?
    Thank you!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hi, I worked this off of my test site with Canape. I’ve limited this to screens/windows 600px and wider as things go slightly awry on screens under 600px wide.

    @media screen and (min-width: 600px) {
    #masthead {
    	top: 0;
    }
    .logged-in #masthead {
      position: fixed;
      top: 32px;
    	width: 100%;
    	z-index: 1;
    }
    }
    Thread Starter freatz

    (@freatz)

    Thank you very much for your answer.
    The code worked on the page, the menu is fixed on the top. But the content of the firts page stays behind the menu. The same happens with the overlay’s text for each image.
    What can I do?
    Thank you!

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Ah, change the z-index to 2 instead of 1.

    Thread Starter freatz

    (@freatz)

    Didn’t work with 2, nor 3… til 7, so I tried with 21 and it worked.
    Of course, the question is: is there a chance something can go wrong using “z-index: 21;”?

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    I don’t think it will cause an issue. I would scroll around on your pages and posts just to make sure.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fix the menu on the top of the screen’ is closed to new replies.