How to configure a menu so that when clicking on an item, you direct the user to the exact start point of the section related to the item clicked?
The problem is that when I click, it directs to the beginning of the paragraph tag instead of the beginning of the section as defined in the menu.
I am using a sticky menu, I describe a part of the code as an example
html code:
...
<div id="navbar">
<a href="#start">Inicio</a>
<a href="#nosotros">Nosotros</a>
<a href="#contact">Contacto</a>
</div>
<script src="js/navbar_javascript.js"></script>
</div>
</header>
For everyone there is a section ...
<section id="nosotros">
<div class="container-fluid">
<div class="quienes_somos">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12 ">
<div class="foto_nosotros">
<img src="" alt="" width="">
</div>>
</div>
<div class="col-lg-6 col-md-6 col-sm-12">
<h3 class="title_que_hacemos">Sobre Nosotros...</h3>
<p class="text_que_hacemos"> ... </p>
</div>
</div>
</div>
</div>
</section>
In css I defined the top and bottom margins for the section:
#nosotros {
margin-top: 10vh;
margin-bottom: 10vh;
}
I hope you have managed to express me well. I already tried several options .. I hope someone can help me! :)