if I toggle the hover effect, the background hides the text. Which atttribute shoud I add that the text of the listpoints is not under the ":before" background.
I also postet a codepen-link so it is easy for you to check my code.
Thanks
<nav>
<ul>
<li>#1111111111</li>
<li>#2222222222</li>
<li>#3333333333</li>
</ul>
</nav>
nav {
position: absolute;
top: 0;
bottom: 0;
background-color: #2c3e50;
width: 100px;
}
nav ul {
margin: 0;
padding: 0;
}
nav ul li {
border-bottom: 1px solid #ecf0f1;
padding: 10px 0 10px 0;
position: relative;
color: red;
}
nav ul li:hover {
color: green;
}
nav ul li:before {
position: absolute;
content: '';
top:0;
left: 0;
width: 0;
height: 100%;
background-color: white;
transition:all 0.3s ease;
z-index: 0;
}
nav ul li:hover::before {
width: 100%;
}
Codepen: http://codepen.io/anon/pen/oBXwVB