I am using this code to generate a css only speech bubble :-
li.selected{
background-color: blue;
a{
color: white;
}
}
li.selected:after{
content: "";
position: absolute;
top: 33%;
left: 390px;
border-top: 10px solid transparent;
// border-top-color: inherit;
border-left: 10px solid blue;
border-right: 10px solid transparent;
border-bottom: 10px solid transparent;
}
While this works fine, the triangle gets left when I move to the next li item as it has got a fixed position, how do I move the triangle as well?
here is my html code :-
<ul>
<li class='selected'>
<a href="/users/credits">Credits</a>
</li>
<div class='line-separator'></div>
<li>
<a href="/users/edit">Change Password</a>
</li>
<div class='line-separator'></div>
<li>
<a href="#">Investor Status</a>
</li>
</ul>