From the course: Bootstrap 4 Layouts: Responsive Single-Page Design

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Making our navigation responsive

Making our navigation responsive - Bootstrap Tutorial

From the course: Bootstrap 4 Layouts: Responsive Single-Page Design

Start my 1-month free trial

Making our navigation responsive

- [Instructor] So assent to make our navigation a bit more responsive. So what we're gonna to do is create a button and that button is going to toggle this series of links right here that are right now in this navbar, Nav and it's going to make them appear or disappear. So we'll start by creating a button. We're gonna do that in this container fluid, and we'll say button, and it's gonna have a class of navbar toggler, and then we're going to pass along some data attributes. Now data attributes in HTML is a way of passing information to a tag or through a tag to some piece of JavaScript code, and so the way that you do that is by adding this data tag, and you can put anything after this dash, and in this case, we're gonna say data toggle in, this is going to be a collapse, so this is what's going to cause some element to collapse, and then we'll say data target. That's another attribute. And these are all made up by Bootstrap, and in this case, we're gonna identify the item that is…

Contents