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

Your preferred username that is used when logging in.

Tooltip placed at bottom by default. How? Created Aug 17, 2010

This thread is solved

Views: 1052     Replies: 1     Last reply Aug 17, 2010  
You must login first before you can use this feature

spurv

Posts: 1

Registered:
Aug 17, 2010

Tooltip placed at bottom by default. How?

Posted: Aug 17, 2010

How do I place the dynamic tooltip at the bottom of an image by default? Seems like the tooltip positions itself at top, and only switches to the bottom, if theres not enough space.
Tried "position: 'bottom center'" but that somehow messes up the backgroundimages (the arrow points the wrong way, ie. down instead of up).

randyfyfe

Posts: 17

Registered:
Aug 17, 2010

» Tooltip placed at bottom by default. How?

Posted: Aug 17, 2010

Reply to: Tooltip placed at bottom by default. How?, from spurv
You were right about the position: 'bottom center' but you need to take a step further. you need to edit some of the css style, for example:

Edit styling so that .tooltip has background:url("/tools/img/tooltip/black_arrow_bottom.png") repeat scroll 0 0 transparent;

then edit the style .tooltip.top to have background:url("/tools/img/tooltip/black_arrow.png") repeat scroll 0 0 transparent;
(it is entended that there is no space between .tooltip and .top)

.tooltip ends up being the "default" tooltip (you set the position as bottom center, so this would be the default position).

the dynamic script adds a class called "top" to the div that has the class "tooltip". .tooltip.top is a way to specify a element with the class="tooltip top". so you need to change this styling so it looks appropriate.

The dynamic scripting i can see not working with older browsers that don't support either multiple classes, or css styling that calls multiple classes together (the lack of space between .tooltip and .top, this would be ie6 I beleive).

There is no way to fix browsers that dont support multiple classes, but to get around ie6's issue of not supporting css calls of .tooltip.top would be to make sure the .top class is not being used for other things, and just have css styling for .top
OR
use HTML tooltips, then encase the hidden div (that contains tooltip content) with another hidden div. Give the new parent div a class or id and make a chained call of like .parentdivfix .top {background:...};