Having trouble with a dynamic fade in/fade out hover transition (jsfiddle included)
http://jsfiddle.net/XztsH/1/
The hover class seems to be pushed down a 20 pixel and I'm not quite sure why.
Maybe it's la开发者_如何学Cte and my brain is dead...
The shift occured because the 'Close' text was occupying the line. Updated the fiddle for you: http://jsfiddle.net/XztsH/3/
Although you put the text far over the to left, it's still taking vertical space. The simplest fix would be to add this:
line-height: 0;
See it updated.
精彩评论