Let's use Bootstrap's grid to create a simple header with navbar.
In the example code below, an HTML header element with Bootstrap's predefined
container class is used:
Inside the header, a row is created by using a div with Bootstrap's
Finally, the row is cut into two parts:
<nav class="col-sm-8 text-right">
<p>nav item 1</p>
<p>nav item 2</p>
<p>nav item 3</p>
The first part consists of the
h1 with Bootstrap's class
col-sm-4. It will take up the first four columns on the grid. The second part consists of the
nav element with class
col-sm-8. It will take up the remaining eight grid columns.
text-right indicates that text will be arranged on the right side of the