I am attempting to create a menu that when user hover into it a label or text will appear on the right side, i manage to create a simple effect using below code. but i am lost with how can i make a label appear when hover.
#side-menu {
background-color : black;
color:white;
width:80px;
padding:20px;
list-style:none;
}
#side-menu:hover {
width: 400px !important;
display:inline-block;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<ul id="side-menu">
<li>
<i class="fa fa-image fa-2x" style="margin-left:17px;"></i>
</li>
</ul>
My goal is to display a label or text on the right side when hover, any suggestions to achieve this? this so far below is my code. thanks in advance!
<li><i class="fa fa-image fa-2x" style="margin-left:17px;"></i> <span class='label-menu'> Product Image <span></li>
.label-menu{
display:none;
}