Can someone help me center the icons in my second navigation bar? I've tried aligning them left and right, and that works, but when I try to center them, it doesn't work at all. Did I miss something in the code or make a mistake? Any assistance would be greatly appreciated.
Here is the CSS code for my second navbar:
.navbartwo {
overflow: hidden;
bottom: 0;
width: 100%;
}
.navbartwo {
background-image: url(nav.png)
}
.navbartwo a {
float: centre;
display: inline-grid;
color: #f2f2f2;
text-align: center;
padding: 14px 13px;
text-decoration: none;
font-size: 15px;
display: flex;
align-items: center;
}
/* links on hover */
.navbartwo a:hover {
background-color: #ddd;
color: black;
}
/* colour to the active/current link */
.navbartwo a.active {
color: #ebeef7;
}
.navbartwo.navbar-nav {
display: inline-block;
float: none;
vertical-align: top;
}
.navbartwo .navbar-collapse {
text-align: center;
}
This is the HTML:
<div class="navbartwo">
<a href="#Dashboard">
<svg id="try" xmlns="http://www.w3.org/2000/svg" width="70" height="70" fill="white" class="bi bi-house-door" viewBox="0 0 16 16">
<path d="M8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4.5a.5.5 0 0 0 .5-.5v-4h2v4a.5.5 0 0 0 .5.5H14a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146zM2.5 14V7.707l5.5-5.5 5.5 5.5V14H10v-4a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v4H2.5z" />
</svg>
<a href="#Map"><svg id="try" xmlns="http://www.w3.org/2000/svg" width="70" height="70" fill="white" class="bi bi-geo-alt" viewBox="0 0 16 16">
<path d="M12.166 8.94c-.524 1.062-1.234 2.12-1.96 3.07A31.493 31.493 0 0 1 8 14.58a31.481 0 ...
(more SVG code)
...
</svg></a>
(repeat for other icons)
<a href="#Community"><svg id="try" xmlns="http://www.w3.org/2000/svg" width="70" height="70" fill="white" class="bi bi-people" viewBox="0 0 16 16">
<path d="M15 14s1 0 1-1-1-4-5-4-5 3-5 4 1 1 1 1 1h8zm-..." />
</svg></a>