Build this UI: responsive navbar
A navigation bar with a logo and links that turns into a menu button on phones.
intermediateHTML & CSS
The task
Style the navigation bar to match the demo above:
- The logo on the left, the links on the right, on one row (Flexbox).
- Links have no underline, and a light background on hover. The current page ("Home") is highlighted.
- On screens narrower than 600px, the links are hidden and the ☰ button shows instead. Pressing it shows the links as a column (the small script already adds the
openclass).
Make the preview narrower (or use your phone) to check the small-screen layout.
What you'll build
The finished result. Try it out, then build it yourself below.
Demo · drag the bottom edge to make it taller