I'm in the process of creating a navigation bar that includes SVG icons.
What's the most effective method to achieve this using Bootstrap 4?
This is my desired outcome:
The closest I've come (without specifying a fixed size for the icons or links) is:
<div class="row justify-content-center">
<div class="col-sm-10">
<nav class="navbar d-flex align-items-end">
<a class="navbar-item active" href="#">
<img src="../images/icons/icon-type-blue.svg">
Type</a>
<a class="navbar-item" href="#">
<img src="../images/icons/icon-size-lightgrey.svg">
Size</a>
<a class="navbar-item" href="#">
<img src="../images/icons/icon-fitting-lightgrey.svg">
Fitting</a>
<a class="navbar-item" href="#">
<img src="../images/icons/icon-results-lightgrey.svg">
Results</a>
</nav>
</div>
</div>
Utilizing the following CSS:
.navbar{
padding: 2em;
border-bottom: solid 2px #00588A;
}
.navbar a{
font-size: 1.25em;
font-weight: 700;
text-align: center;
text-transform: uppercase;
color: #ccc;
}
.navbar a.active{
color: #00588A;
}
.navbar a img{
margin-bottom: 0.75em;
}
Could there be a better approach for integration?
Is setting a fixed size for the link the optimal solution?