Would you mind to take a look at my jsfiddle?
As you can see, I putted a horizontal line below an active list item anchor.
I want the horizontal line to be at the bottom** of an anchor, just like a border-bottom when hovering, not at where my cursor stands. Can anybody help me out?
Thank you in advanced!
With Kind Regards,
Jonathan
The problem is because you were using an
lielement for the line that it was stopping the mouseover of theuland reversing the animation. Instead use adivinside a containing element, with a lower z-index to stop it intercepting the mouseover event.HTML:
Amended javascript:
Example fiddle
Also, you need to make the
border-bottomtransparent on theul li aelements for the line to show through them. You could usemargin-bottom: 1pxif you prefer.