HTML and CSS: Creating Navigation Bars

HTML and CSS: Creating Navigation Bars

2h 17mIntermediate2021-08-13

Authors

Jen Kramer

Jen Kramer

Teaches web design and development

Course details

Even if your product or service is truly original, the app or site you build for it is going to share elements with every other app or site on the planet. Take, for example, the humble navigation bar, which your users need to find their way through your site. In this course, instructor Jen Kramer demonstrates how to create beautiful, accessible navbars using HTML and CSS techniques that work in any web context. Jen starts by detailing the proper markup for a nav bar and the box model associated with its elements. She then goes over how to style both vertical and horizontal navigation bars—including how to put a logo right in the middle of a horizontal navbar. Finally, Jen shares a few advanced tricks, including how to create dropdowns and mobile layouts with hamburger buttons with CSS, no JavaScript required.

Skills covered

HTMLInteraction DesignCSSWeb StandardsWeb DesignFront-End Web DevelopmentUser ExperienceWeb DevelopmentOpen SourceDeep Dive (X:Y)

Concepts

Introduction

  • Navigating the web with navbars
  • Working with CodePen

Navigation Bar Basics

  • Using HTML to mark up a navbar
  • Understanding the box model of a navbar
  • Removing default list styling
  • Understanding link states and styling the text

Vertical Navigation Bars

  • Creating space in your navbar
  • Enlarging the clickable area of the link
  • Indicating where you are in the navigation
  • Adding an icon to the link in an accessible way
  • Using background images in links for styling
  • Challenge - Style a vertical navbar
  • Solution - Style a vertical navbar

Horizontal Navigation Bars

  • Making navigation go horizontal with inline-block
  • Making navigation go horizontal with Flexbox
  • Centering and styling a horizontal navigation bar
  • Placing a logo in the center of a horizontal navbar
  • Challenge - Style a horizontal navbar
  • Solution - Style a horizontal navbar

Responsive Navigation Bars

  • Add icons for a hamburger button
  • Adding hamburger button functionality with CSS
  • Styling the navbar and hamburger button with media queries
  • Challenge - Make your navbar responsive
  • Solution - Make your navbar responsive

Nested Navigation Bars

  • Adding and styling a second level of vertical navigation
  • Adding a second layer of horizontal navigation
  • Creating dropdowns with CSS

Conclusion

  • Additional HTML and CSS courses
80,000 Toman