HTML and CSS

Breadcrumbs

What Are Breadcrumbs?

Breadcrumbs are a type of secondary navigation that helps users understand and navigate the hierarchy of a website. They typically appear near the top of a webpage and show the user's current location within the site's structure.

Below is a CSS example that styles breadcrumbs using skewed boxes for a dynamic, modern visual effect. The boxes are skewed, but the text inside each box remains straight, ensuring readability.

CSS
.breadcrumbs-container nav ul {
  padding: 0;
  margin: 10px 0 0 0;
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.breadcrumbs-container nav li {
  list-style: none; 
  display: inline-block;
  margin: 0 10px 10px 0;
}
  
.breadcrumbs-container nav li a {
  display: inline-block;
  text-decoration: none;
  padding: 4px 14px;
  border: 1px solid #fff;
  background: rgba(255, 255, 255, 0.69); 
  color: #999;
  transform: skew(-10deg);
}
  
.breadcrumbs-container nav li a:hover {
  background: rgba(224, 224, 234, 0.69);
  color: #999;
  box-shadow: none;
}
  
.breadcrumbs-container nav li span {
  display: inline-block;
  transform: skew(10deg);
}
  
.breadcrumbs-container nav li.active {
  display: inline-block;
  background-color: rgba(199, 110, 0, 0.9);
  color: #fff;
  padding: 4px 14px;
  transform: skew(-10deg);
} 
  
.breadcrumbs-container nav li.active span {
  display: inline-block;
  transform: skew(10deg);
}
HTML
<div class="breadcrumbs-container">
 <nav>
  <ul>
   <li><a href="#"><span>Level 1</span></a></li>
   <li><a href="#"><span>Level 2</span></a></li>
   <li><a href="#"><span>Level 3</span></a></li>
   <li><a href="#"><span>Level 4</span></a></li>
   <li class="active"><span>Active</span></li>
  </ul>
 </nav> 
</div>