Use position: fixed;
in the css of your menu, it can be inline (in the code line) or external (separate file), follow the example with css inline:
<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 you can do this:
.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 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!