Struggling to implement a fixed bottom menu on my page. Can anyone help with making it responsive?
I've attempted to create the menu, but I'm having trouble linking the logo and menu items together.
HTML
<header class="header">
<a href="/"><img class="header__logo" src="/assets/icons/logo.png"></a>
</header>
<div class="navbar">
<a href="/" class="navbar__logo">
<img src="/assets/icons/logo.png">
<img class="navbar__icon" src="/assets/icons/navbar.svg" alt="navbar">
</a>
<div class="navbar__container">
<a href="/" class="navbar__link navbar__link-selected">Contact</a>
<a href="/vacancies" class="navbar__link">Vacancies</a>
<a href="/contacts" class="navbar__link">Contact Us</a>
</div>
</div>
SCSS
.navbar {
z-index: 10000;
position: fixed;
top: auto;
bottom: 0%;
left: 0%;
right: 0%;
margin: 0 auto;
margin-bottom: 50px;
display: flex;
justify-content: center;
align-items: center;
gap: 10px;
* {
z-index: 2000;
}
}
.navbar__logo {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 60px;
height: 60px;
background-color: rgba(68, 68, 74, 1);
border-radius: 50px;
padding: 10px;
}
.navbar__logo img {
z-index: 1000;
}
.navbar__icon {
z-index: 100 !important;
position: absolute;
left: 0;
top: 0;
}
.navbar__logo img {
max-height: 100%;
}
.navbar__container {
background-color: rgba(68, 68, 74, 1);
height: 60px;
border-radius: 80px;
padding: 0 8px;
display: flex;
align-items: center;
gap: 10px;
}
.navbar__link {
font-size: 24px;
line-height: 100%;
background-color: transparent;
border-radius: 40px;
padding: 14px 24px;
&:hover {
background-color: #6b6b6b;
}
}
.navbar__link-selected {
background-color: #27272b;
&:hover {
background-color: #27272b;
}
}
Although I've created something similar, I can't seem to make it work well on mobile devices. Any suggestions for improvement?