'Link button to HTML specific section
I'm trying to link my button to a specific section of my website, this is the code:
```
<div>
<button class="btn btn-opacity-light mr-1" a class="nav-link" <a href="#features-section"></a>Empezar Ahora</button>
</div>```
and this is the section im trying to link it:
```
<div class="content-wrapper">
<div class="container">
<section class="features-overview" id="features-section" >
<div class="content-header">
<h2>Experiencia EPCE</h2>
<h6 class="section-subtitle text-muted">En EPCE nos centramos en brindar el conocimiento y la experiencia que el mercado laboral y profesional requiere, a través de diversos instructores especializados en distintos campos. Brindamos una metodología única y acorde a los desafíos actuales, mediante el desarrollo de casos reales y asimilación de conocimiento.</h6>
</div>
<div class="d-md-flex justify-content-between">
<div class="grid-margin d-flex justify-content-start">
<div class="features-width">
<img src="images/Group12.svg" alt="" class="img-icons">
<h5 class="py-3">Aprende</h5>
<p class="text-muted">Nuevos conocimientos a través de las sesiones educativas y aplicación práctica.</p>
</div>
</div>
<div class="grid-margin d-flex justify-content-center">
<div class="features-width">
<img src="images/Group7.svg" alt="" class="img-icons">
<h5 class="py-3">Vive</h5>
<p class="text-muted">La amplia gama de experiencias brindada por nuestros instructores.</p>
</div>
</div>
<div class="grid-margin d-flex justify-content-end">
<div class="features-width">
<img src="images/Group5.svg" alt="" class="img-icons">
<h5 class="py-3">Innova</h5>
<p class="text-muted">Con soluciones efectivas a través de las herramientas y conocimientos brindados en EPCE.</p>
</div>
</div>
</div>
</section> ```
Hope someone can help me out thanks.
Solution 1:[1]
Why not:
<a href="#features-section" class="btn btn-opacity-light mr-1 nav-link">
Empezar Ahora
</a>
EDIT:
If your button become huge, add a class to it, like "home-button" and add:
.home-button {
display: inline-block;
padding: 0 5px 0 5px;
}
to your CSS stylesheet
Solution 2:[2]
this works fine
a href="#features-section" type="button" class="btn btn-opacity-light mr-1 nav-link">
Empezar Ahora
</a>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | LaideLawal |
