Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Bootstrap 4

You're reading from   Learning Bootstrap 4 Modern, Elegant and Responsive Web Design Made Easy

Arrow left icon
Product type Paperback
Published in Aug 2016
Publisher Packt
ISBN-13 9781785881008
Length 246 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Matt Lambert Matt Lambert
Author Profile Icon Matt Lambert
Matt Lambert
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Introducing Bootstrap 4 FREE CHAPTER 2. Using Bootstrap Build Tools 3. Jumping into Flexbox 4. Working with Layouts 5. Working with Content 6. Playing with Components 7. Extending Bootstrap with JavaScript Plugins 8. Throwing in Some Sass 9. Migrating from Version 3

Adding Breadcrumbs to a page


The Breadcrumbs component is a pretty easy one to use in Bootstrap. Let's check out the code for how to render one:

<ol class="breadcrumb"> 
  <li><a href="#">Home</a></li> 
  <li><a href="#">Page 1</a></li> 
  <li class="active">Page 2</li> 
</ol> 

As you can see, the code for this component is pretty basic, let's review it:

  • The Breadcrumb component uses an ordered list or <ol> tag as its base.

  • Within the ordered list, you simply just need to create a list of links. The last item in the list should have a class of .active on it.

Adding Breadcrumbs to the Blog post page

For this example, let's actually add some Breadcrumbs to our Blog post page template. Open up blog-post.ejs and add the following code after the container <div> at the top:

<div class="row m-t-1"> 
    <ol class="breadcrumb"> 
      <li><a href="#">Home</a...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime