开发者

Hover Over Icon to Display a Caption Not Working Out

so I have a row of image icons which are tightly packed into an area, and I want them to move up slightly when I hover over them, and fade in a title just below the icon. I've been able to successfully do this on my own site (can't link to it, sorry), except that I can't get the text to center below the icon and not affect the layout. I've tried position开发者_如何学Pythoning the title using position: absolute, but that uncenters the text below the icon. Without the absolute positioning, when it fades in it screws up the rest of the layout. I would just manually position each label using absolute positioning, but our web app is internationalized, so the words will be different lengths, so this needs to be dynamic. I tried creating a jsfiddle to show what I was doing, but apparently hover doesn't work in it?

http://jsfiddle.net/QYDmM/

Hope someone can help!


See this jsfiddle: http://jsfiddle.net/RikudoSennin/QYDmM/3/

What I changed is I added a new line to the jQuery and added position: relative; on .icon-holder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜