I’m trying to make fancy hover effect when contents is revealed when user hovers image. I want hover bubble to be centered and on the top of images.
Illustrated in this fiddle: http://jsfiddle.net/sandrodz/TnEMU/
It is especially bad in chrome, where span which is automatically turned to display:inline on hover behaves differently from firefox. Putting both as block elements helps but hidden element is pan and it automatically gets display:inline. Any thoughts on how to fix this problem and make hover appear directly on top of correct images?
Thanks!
There you go (with your code)
The
CSSchanges:And inside jquery I just added:
outerWidth(true)to get the right dimensions:You can also try: removing all of your
<SPAN>elementsa different approach:
jsFiddle demo
In any case your icons need an alt attribute… so why not give the SPAN text to each image: (any CMS editor allows you to add alt. description text to images.)
So you can remove ALL your spans, append after the
<body>tag this:and use my script:
alttext#tooltipwith thext#tooltipP.S: I just renamed in your CSS:
#features_icons li span {to#tooltip{