From the course: CSS: Combining Grid and Flexbox

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Create a hamburger menu for mobile

Create a hamburger menu for mobile - CSS Tutorial

From the course: CSS: Combining Grid and Flexbox

Create a hamburger menu for mobile

- [Instructor] For this web project, we will have a responsive menu that is sticky. It will initially appear underneath our hero image and when the user scrolls, it will stick to the upper portion of the page. I really like this technique, as the menu is always available. This makes it really easy for users at any time and as a great solution when you have long pages, like we do here. Because we always want to build mobile first, let's focus on the small screen treatment of our navigation. As you can see, we will have a hamburger menu icon and when the user clicks it, it will transform into an X with a cool little CSS animation technique and display the menu choices underneath. At the small screen, we want to have our logo appear on the left side and the menu icon on the right. This is a perfect use case for Flexbox. Let's jump into the code and begin creating this. The starting file that I've provided to you has the…

Contents