You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Bad tooltip positioning with float images Created Aug 15, 2010

This thread is solved

Views: 1797     Replies: 4     Last reply May 19, 2011  
You must login first before you can use this feature

tnndesign

Posts: 4

Registered:
Aug 15, 2010

Bad tooltip positioning with float images

Posted: Aug 15, 2010

I am integrating jQuery Tooltip UI on my site. Everything works fine testing the tooltips in a standalone page with simple HTML-based links, but when I try to use menu buttons on my site to activate the tooltip, the positioning doesn't render correctly on most browsers.

Oddly enough IE6/IE7 render correctly, but everthing else FF3.0+, Chrome, Safari render the tooltip to the far left of the screen not underneath the button.

I am using the "bottom center" positioning statement in the JQuery parameters for the tooltip.

Example CSS for an image which is acting as a button (to display tooltip below):


CSS for button positioning:
#button {
  margin-right: 5px;
  margin-top: 102px;
  display: inline;
  float: right;
  height: 26px;
  margin-bottom: 0;
  width: 100px;
}

Link using float image:
<a href="#"><img src="button.png" id="button" />

Any ideas on how I can resolve this?
If I don't use float positioning for the buttons, everything works fine. But need to do this for the layout on the site!

randyfyfe

Posts: 17

Registered:
Aug 17, 2010

» Bad tooltip positioning with float images

Posted: Aug 17, 2010

Reply to: Bad tooltip positioning with float images, from tnndesign
url to page having the problem?

tnndesign

Posts: 4

Registered:
Aug 15, 2010

» » » Bad tooltip positioning with float images

Posted: May 19, 2011

Reply to: » » Bad tooltip positioning with float images, from marcog
Hi Marcog.

What I meant was originally I was trying to target the IDs of the anchor tags with the button images inside them, instead of the IDs of the images themselves.

etc

<a id="mylink" href="somepage.html"><img id="myimg" src="someimage.jpg/></a>

Instead of targeting "mylink", you should target "myimg".

Hope that helps.