I have created a breadcrumb using CSS and HTML, but I want to add a unique style to one of the items in the list without using hover effects. I attempted to apply a different class with a background color but it didn't work as expected.
Does anyone have a solution for this?
Thank you!
body{
font-family:Arial, Helvetica, sans-serif;
}
#crumbs ul li a {
display: block;
float: left;
height: 15px;
background: #999;
text-align: center;
padding: 20px 30px 0 20px;
position: relative;
margin: 0 10px 0 0;
font-size: 18px;
text-decoration: none;
color: #fff;
line-height: 1px;
cursor:default;
}
#crumbs ul li a:after {
content: "";
position: absolute; right: -17px; top: 0;
border-top: 17px solid transparent;
border-bottom: 17px solid transparent;
border-left: 17px solid #999;
z-index: 1;
}
#crumbs ul li a:before {
content: "";
border-top: 17px solid transparent;
border-bottom: 17px solid transparent;
border-left: 17px solid #fff;
position: absolute; left: 0; top: 0;
}
#crumbs ul li {
display:inline;
}
/* To add a unique color to a specific item */
#unique-item {
background-color: red;
}
#crumbs ul li a:hover {
background: #779519;
}
#crumbs ul li a:hover:after {
border-left-color: #779519;
}
... (additional code)
</div>