Use position: fixed;
in your menu css, it can be inline (in the code line) or external (separate file), follow the example with inline css:
<header style="position: fixed;">
<img src="imgs/principal.jpg" alt="estilo">
<nav id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Consultoria de imagem</a></li>
<li><a href="#">Outros Serviços</a></li>
<li><a href="#">Sobre</a></li>
<li><a href="#">Contato</a></li>
</ul>
</header>
now if you want to do external can do so:
.menu {
position: fixed;
}
<header class="menu">
<img src="imgs/principal.jpg" alt="estilo">
<nav id="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Consultoria de imagem</a></li>
<li><a href="#">Outros Serviços</a></li>
<li><a href="#">Sobre</a></li>
<li><a href="#">Contato</a></li>
</ul>
</header>
Now if you want something on top of everything, use in css z-index: 9900;
, z-index is priority order, the largest number will be on top. (is that in your question was insira o código aqui
).
Well that’s it, anything let me know!