I have this list menu and I want to display arrows for each of the items so when you hover over the item the arrow changes the color. So far my problem seems to be aligning this arrow vertically centered compared to the text. As you can see from the screenshot it is slightly off. Ignore the missing space between the arrow and the hyperlink.
@Paulie_D Cleared my cache and tried it again and im still seeing the sprite. However, I am using chrome. Which browser are you using ? Have not tested the code on other browsers yet.
I have this list menu and I want to display arrows for each of the items so when you hover over the item the arrow changes the color. So far my problem seems to be aligning this arrow vertically centered compared to the text. As you can see from the screenshot it is slightly off. Ignore the missing space between the arrow and the hyperlink.
http://i.imgur.com/2XCHZ.png
HTML,
CSS,
Have you tried repositioning your sprite's coordinates? And I think it is better to use the ::before pseudo selector on your 'a' tag.
How do I do that ?
Ive uploaded the code to fiddle -> http://jsfiddle.net/7xbse/
I'm not seeing an arrow at all on each list item in the image you linked.
The fiddle you linked also doesn't seem to have any arrows either, at least they aren't showing up.
They do show up. Its very light grey though. Perhaps why you didnt see it in the first place.
Your sprite doesn't seem to be loading properly in jsfiddle @kasunt
@Watson90 Should see the following. Im seeing the arrows and mouse over fading working.
Nope...not getting that.
Nope, I get this:
Me too.
It's weird because your actual sprite used in your CSS on your JS Fiddle is linking to imgur. Is that correct?
@Paulie_D Cleared my cache and tried it again and im still seeing the sprite. However, I am using chrome. Which browser are you using ? Have not tested the code on other browsers yet.
@Watson90 That is correct. This is quite weird.
I've tested in IE10, Chrome, Firefox, Opera and Safari and it still looks the same...
Sorry guys check the updated version: New link
It may have been something to do with the uploaded images not linking to an account.
Here....try this. http://codepen.io/anon/pen/kjefy
Offhand I think all that is necessary is to change the position to get it to line up in
if you make it -813px it looks about right.
Thanks. Any idea what should be done to align the arrow ?
I have done what I believe is a dirty hack : http://codepen.io/anon/pen/LcKxJ
I used,