I can’t fix menu and site header

Asked

Viewed 58 times

2

I’m trying to fix the menu and the header of the site, but I can’t!! I managed to get him online in case you could take a look: http://www.projectxna.esy.es/site-teste

As you can see, when using the mouse scroll, the menu goes down, the logo does not go down and neither does the header!!

Could you help me?

  • Don’t forget to always provide your code next to your problem so we can understand the scenario you are in.

  • Bro, you tagged Bootstrap so put the navbar-Fixed-top class on the menu tag Parent and put your 60px content down with a margin-top

1 answer

0

In your css apply these properties to your header:

header {
    position:fixed; //deixa o elemento fixo na pagina
    top:0; //diz qual distância do topo ele ficará fixado, nesse caso, uma distância igual a zero.
    z-index:999; //aplica o nível de profundidade (camadas) do elemento, quanto maior, mais para "cima" na dimensão 'Z' ele vai ficar
}

Don’t forget that after this, you will probably need to put a margin on your Nav, as it will be "below" the menu.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.