I created a dropdown menu, the menu opens when it has a hover effect. Then I added elements to this menu and when I create a hover effect on them, other menus open. But when I wanted to expand the menu one more step, I couldn't use the hover effect.
As you can see in the image, I can show the sub menu in a dropdown item with the hover effect, but before the mouse moves to that sub menu, it appears on the element under it. How can I create a 3 layer sub menu?
.navtop>ul {
position: relative;
z-index: 1
}
.navtop>ul>li {
float: left;
border-left: 1px solid #fff;
}
.navtop ul li a {
display: block;
padding: 10px 20px;
color: #ccc
}
.navtop ul li:first-child {
border: none;
}
.navtop>ul>li:hover>ul {
display: block;
}
.navtop>ul>li>ul>li:hover ul {
display: block;
}
.navtop>ul>li>ul>li>ul>li:hover>ul {
display: block;
} // it didn't work.
.navtop>ul>li>ul li {
position: relative;
}
.navtop>ul>li>ul {
display: none;
position: absolute;
background: #333;
}
.navtop>ul>li>ul>li>ul {
display: none;
position: absolute;
left: 100%;
top: 1px;
background: #333
}
.navtop>ul>li>ul>li>ul>li>ul {
display: none;
position: absolute;
left: 100%;
top: 1px;
background: #333
} // it didn't work.
<div class="wrap">
<nav class="navtop">
<ul>
<li><a href="#"><b class="caret"></b>Dropdwown Menus</a>
<ul class="container">
<li><a href="#">Dropdown Menu 1</a>
<ul>
<li><a href="#">Dropdown Submenu 1</a>
<ul>
<li><a href="#">Dropdown Sub menu</a></li>
</ul>
</li>
<li><a href="#">Dropdown Submenu 2</a></li>
<li><a href="#">Dropdown Submenu 3</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="clear"></div>
</nav>
</div>
