Hello, I have a page with a menu (nav bar) and when I click on a menu link the page should point to the corresponding session , for example, when I click on the envelope I have a session session is with a hidden part behind the menu, ie the height
of the menu is not respected as in the following image / p>
What'swithablueoutlineisthesession,noticehowitgoesuptherebehindthemenu.
HTMLCSS
nav {
display: flex;
flex-direction: column;
align-items: center;
background-color: #f5f5f5;
position: fixed;
top:0;
width: 100%;
}
nav a img{
display: flex;
text-align: center;
flex-direction: column;
width: 200px;
padding: 0;
}
nav > a{
text-decoration: none;
color: azure;
font-weight: 700;
font-size: 28px;
font-family: serif
}
nav ul{
list-style: none;
padding: 10px;
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}
nav ul li{
text-align: center;
width: 100%;
font-weight: bold;
font-size: 20px
}
nav ul li a {
display: inline-block;
padding: 10px 0;
width: 100%;
text-decoration: none;
color: darkblue;
}
<nav>
<a href="#top"><img src="imagens/Logo%20DMDUQUE%20Final.png"></a>
<ul>
<li><a href="#sobre">Sobre</a></li>
<li><a href="#servicos">Serviços</a></li>
<li><a href="#contato">Contato</a></li>
</ul>
</nav>