1
I need to make a vertical menu following this layout but I’m having difficulties to make the menu open one dropdown
I’m using bootstrap 4
follows my code + the layout image of how it should look.
HTML:
<div class="left">
<div class="item active">
<i class="fas material-icons">keyboard</i>
<a href="#">teste</a>
<ul class="list-unstyled drop">
<li><a href="#">asdfasdfad</a></li>
</ul>
</div>
<div class="item">
<i class="fas material-icons">keyboard</i>
<a href="#">teste</a>
</div>
<div class="item">
<i class="fas material-icons">keyboard</i>
<a href="#">teste</a>
</div>
<div class="item">
<i class="fas material-icons">keyboard</i>
<a href="#">teste</a>
</div>
</div>
SCSS:
.left {
position: fixed;
top: 50%;
left: 15px;
background: #337ab7;
display: inline-block;
white-space: nowrap;
width: 50px;
transition: width .5s;
}
.item:hover {
background-color: #222;
width: 250px;
}
.left .fas {
margin: 15px;
width: 20px;
color: #fff;
}
i.fas {
font-size: 17px;
vertical-align: middle !important;
}
.item {
height: 50px;
overflow: hidden;
a{
color: #fff;
}
.drop{
li{
a{
display: none;
}
}
}
}
.item{
a{
&:hover{
.drop{
li{
a{
display: block;
}
}
}
}
}
}