My goal is to have the navigation menu bar centered in my navbar, and it looks great on every screen size except for medium. In medium-sized screens, the menu shifts to the bottom right and I've tried various solutions like adjusting margins, padding, and flex alignments, but nothing seems to work. Can someone please help me figure this out?
'''
<!--HTML-->
<nav id='header-nav' class='navbar navbar-expand-lg navbar-dark bg-dark'>
<div class='container-fluid mx-auto'>
<div class='navbar-brand'>
<a href="index.html">
<div class='d-none d-md-block' id='logo' alt='piano logo'></div>
</a>
<h1><a href='index.html' id='header1' class='d-flex text-light'>Sandra's Studio</a></h1>
<h2 id='header2' class='d-flex text-info'>Cumming, GA</h2>
</div>
<!--Menu Button-->
<button id='menuButton' class="d-flex ml-auto d-block d-lg-none navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class='collapse navbar-collapse justify-content-end' id='navbarSupportedContent'>
<ul id='nav nav-tabs' class='navbar-nav'>
<!--Home Button-->
<li class='nav-item d-block d-lg-none text-center text-lg-right'>
<a class='nav-link active' id='home' href='index.html'>home</a>
</li>
<!--New Students Button-->
<li class='nav-item text-center text-lg-right'>
<a class='nav-link' id='lessons' href='html/new-students.html'>looking for lessons</a>
</li>
<!--Previous Students Button-->
<li class='nav-item text-center text-lg-right'>
<a class='nav-link' id='existing' href='html/existing-students.html'>already a student</a>
</li>
<!--Info Dropdown-->
<li class='nav-item dropdown'>
<a class="nav-link dropdown-toggle text-center text-lg-right" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Info</a>
<div class='dropdown-menu bg-info'>
<a class='dropdown-item text-center' href='#testimonials'>testimonials</a>
<a class='dropdown-item text-center' href='#schedule'>schedule</a>
<a class='dropdown-item text-center' href='#address'>address</a>
</div>
</ul>
</div>
</div>
</div>
</nav>
</header>
'''
'''
* {
box-sizing: border-box;
text-decoration: none;
}
body {
font-size: 16px;
font-family: "Montserrat", sans-serif;
}
/*Navbar*/
#header-nav {
width: 100%;
}
div.navbar-header {
padding-bottom: 0;
}
#logo {
background: url('../images/piano.png') no-repeat;
float: left;
width: 200px;
height: 200px;
margin: 0 20px 0 0;
}
.navbar-brand {
margin: 0;
padding-top: 15px;
height: auto;
width: auto;
text-align: center;
}
.navbar-brand #header1 {
text-transform: uppercase;
font-family: bebas-neue, sans-serif;
text-shadow: 1px 1px 1px #222;
line-height: .75;
margin: 0;
padding: 0;
}
.navbar-brand #header2 {
text-transform: uppercase;
margin: 0;
padding: 0;
font-weight: 600;
}
a:hover,.navbar-brand a:focus {
color: #FDECEF;
text-decoration: none;
}
#header1 {
color: #FDECEF;
}
/*Menu Buttons*/
.navbar-toggler-icon {
color: #FFF;
}
#nav-list {
margin-top: 10px;
}
#nav-list a {
color: #F2F3F4;
text-align: center;
}
.nav-link {
text-transform: uppercase;
}
.dropdown-menu {
text-transform: uppercase;
border-radius: 8px;
}
/*Responsive Framework*/
/*Extra Large Devices*/
@media (min-width: 1200px) {
.navbar-brand #header1 {
font-size: 2em;
}
.navbar-brand #header2 {
font-size: 1.5em;
}
#navbarSupportedContent {
margin-right: 75px;
}
}
/*Large Devices*/
@media (min-width: 992px) and (max-width: 1199.98px) {
#logo {
background: url('../images/piano-medium.png') no-repeat;
width: 150px;
height: 150px;
}
.navbar-brand #header1 {
font-size: 1.75em;
}
.navbar-brand #header2 {
font-size: 1.25em;
}
#navbarSupportedContent {
margin-right: 75px;
}
}
/*Medium Devices*/
@media (min-width: 768px) and (max-width: 991.98px) {
#logo {
background: url('../images/piano-medium.png') no-repeat;
width: 150px;
height: 150px;
}
.navbar-brand {
width: 100%;
}
.navbar-brand #header1 {
margin: 0 0 0 10px;
font-size: 1.5em;
}
.navbar-brand #header2 {
margin: 10px 0 0 10px;
font-size: 1em;
}
.nav-item {
font-size: 2em;
}
.dropdown-item {
font-size: 1.5em;
}
}
/*Small Devices*/
@media (min-width: 576px) and (max-width: 767.98px) {
.navbar-brand #header1 {
margin: 0;
font-size: 1.5em;
}
.navbar-brand #header2 {
margin: 10px 0 0 10px;
font-size: 1em;
}
}
/*Extra Small Devices*/
@media (max-width: 575.98px) {
.navbar-brand #header1 {
margin: 0;
font-size: 10vw;
}
.navbar-brand #header2 {
margin: 10px 0 0 10px;
font-size: 3.5vw;
}
}
/*Extremely Small Devices*/
@media (max-width: 400px) {
.navbar-brand #header1 {
font-size: 8vw;
}
.navbar-brand a {
font-size: 5vw;
}
}
'''