Is there a more efficient way to accomplish this task? My current approach involves creating a slide-in background color effect when hovering over a link. However, I am encountering some difficulties with the CSS implementation. In my setup, each link contains a span element (used to represent the background color) followed by text like this:
<a href="/info/about"><span></span>About</a>
The issue I'm facing is that the text appears behind the span element when rendered. I've attempted adjusting the order of elements without success. How can I resolve this issue?
I have applied z-index
values to each element, but the problem persists.
You can view the code on JSFiddle here: http://jsfiddle.net/h5rnj/