I have a horizontal menu with multiple elements <li>
. But passing the mouse on the last item, that is on the last element <li>
- "Services", opens another list of items that also contains elements with the li
tag. p>
The problem is that in this second list of items I do not want the styles from the previous list (first list) to be applied. How can I get around this?
Follow the HTML:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><linkhref="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<style>
.breadcrumb {
padding: 0px;
background: #D4D4D4;
list-style: none;
overflow: hidden;
margin-top: 20px;
}
.breadcrumb>li+li:before {
padding: 0;
}
.breadcrumb li {
float: left;
}
.breadcrumb li.active a {
background: brown;
background: #ffc107 ;
}
.breadcrumb li.completed a {
background: brown;
background: hsla(153, 57%, 51%, 1);
}
.breadcrumb li.active a:after {
border-left: 30px solid #ffc107 ;
}
.breadcrumb li.completed a:after {
border-left: 30px solid hsla(153, 57%, 51%, 1);
}
.breadcrumb li a {
color: white;
text-decoration: none;
padding: 10px 0 10px 45px;
position: relative;
display: block;
float: left;
}
.breadcrumb li a:after {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid hsla(0, 0%, 83%, 1);
position: absolute;
top: 50%;
margin-top: -50px;
left: 100%;
z-index: 2;
}
.breadcrumb li a:before {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid white;
position: absolute;
top: 50%;
margin-top: -50px;
margin-left: 1px;
left: 100%;
z-index: 1;
}
.breadcrumb li:first-child a {
padding-left: 15px;
}
.breadcrumb li a:hover {
background: #ffc107 ;
}
.breadcrumb li a:hover:after {
border-left-color: #ffc107 !important;
}
</style>
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="container">
<div class="row">
<ul class="breadcrumb">
<li class=""><a href="#">Inicio</a></li>
<li class=""><a href="#">Noticias</a></li>
<li class="dropdown mega-dropdown ">
<a href="#" class="dropdown-toggle Negrito" data-toggle="dropdown">Serviços <span class="caret"></span></a>
<div class="dropdown-menu mega-dropdown-menu">
<div class="widget-box">
<div class="widget-title">
<ul class="nav nav-tabs nav-tabs-carousel">
<li class="active"><a data-toggle="tab" href="#tab1">Serviço 1</a> </li>
<li><a data-toggle="tab" href="#tab2">Serviço 2</a></li>
<li><a data-toggle="tab" href="#tab3">Serviço 3</a></li>
<li><a data-toggle="tab" href="#tab4">Serviço 4</a></li>
</ul>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</nav>