Where the code isn't pretty but it's alive!
<body> <div class="nav-hero"> <div class="nav"> <!-- Teal color background area--> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> <li><a href="#">FAQ</a></li> </ul> </div> <div class="hero-label"> <!-- Tomato color background area--> <h1>Mobile Responsive Nav</h1> </div> </div> </body>
*{ margin: 0; padding: 0; box-sizing: border-box; } .nav-hero{ height: 100vh; display: flex; flex-direction: column; background-color: tomato; } .nav{ flex: 10vh; background: teal; } .nav ul{ display: flex; height: 100%; justify-content: space-around; align-items: center; } .nav li{ list-style: none; } .nav a{ text-decoration: none; color: white; font-size: 1rem; } .hero-label{ flex: 90vh; display: flex; justify-content: center; align-items: center; } .hero-label h1{ font-size: 4rem; color: white; } /* Media Queries*/ @media only screen and (max-width: 1024px) { .nav a{ font-size: 2rem; } } @media only screen and (max-width: 650px) { .nav a{ font-size: 1rem; } .hero-label h1{ font-size: 2rem; } } @media only screen and (max-width: 320px) { .hero-label h1{ font-size: 1.5rem; } }