I have a problem with this css. I would like when I hover the mouse over an item the text color turns blue and the background stays white. I would also like the menu text to be white. What happens is that when I hover with the mouse, since the .menu li:hover item must have a white background, even the text, if I put
a {
color: white;
}
it stays white. How can I solve this?
.menu{
list-style-type: none;
width: 200px;
background: linear-gradient(to bottom, #1D72B9, #35A8E0);
padding: 30px 0 30px 30px;
}
.menu li{
position: relative;
padding: 5px;
border-radius: 10px 0 0 10px;
}
.menu li:hover{
background: white;
}
a:focus,a:hover{
outline:0;
color: #1D72B9;
text-decoration:none
}
.menu li:hover:after,
.menu li:hover:before{
content:'';
position: absolute;
width: 10px;
height: 10px;
right: 0px;
color:white;
}
.menu li:hover:after{
top: -10px;
background: radial-gradient(circle at top left, 10px, white 11px);
}
.menu li:hover:before{
bottom: -10px;
background: radial-gradient(circle at bottom left, 10px, white 11px);
}
a {
color: white;
}
li,ul{
padding:0;
margin:0
}
<ul class="menu">
<li><a href="<%= restaurants_restaurant_profile_path %>"><i class="fa fa-home" aria-hidden="true"></i><span class="hidden-xs hidden-sm"> Profile</span></a></li>
<li class="active"><a href="<%= restaurants_reservation_book_path %>"><i class="fa fa-tasks" aria-hidden="true"></i><span class="hidden-xs hidden-sm"> Reservation Book</span></a></li>
<li><a href="#"><i class="fa fa-chart-bar" aria-hidden="true"></i><span class="hidden-xs hidden-sm"> Statistics</span></a></li>
<li><a href="#"><i class="fa fa-user" aria-hidden="true"></i><span class="hidden-xs hidden-sm"> CRM</span></a></li>
<li><a href="#"><i class="fa fa-calendar" aria-hidden="true"></i><span class="hidden-xs hidden-sm"> Settings</span></a></li>
<li><a href="#"><i class="fa fa-cog" aria-hidden="true"></i><span class="hidden-xs hidden-sm"> Support</span></a></li>
</ul>