View Full Version : on cool dhtml tooltips2, if there is no "space" on content, the result look untidy.

01-02-2009, 07:08 AM
1) Script Title: on cool dhtml tooltips2, if there is no "space" on content, the result look untidy.

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip2.htm

3) Describe problem:

hello...., i'm using cool dhtml tooltips as a shoutt effect on every member on my site.
unfortunately, if my member type his/her shout text without "space", my shout effect become untidy.

please see this member: http://smansakra.net.tc/guestbook.php?owner=122

you will see the untidy shout text when you move your mouse over her picture.

can anyone help?

01-02-2009, 07:09 AM

01-02-2009, 03:48 PM
In the tooltips.css file:

position: absolute;
left: -300px;
width: auto!important;
border: 1px solid black;
padding: 2px;
background-color: lightyellow;
visibility: hidden;
z-index: 200;
/*Remove below line to remove shadow. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);

That will allow the tip to easily shrink or grow as needed. The only other thing I can think of would be to add spaces in some sort of validation process when the shout text is saved, but if this is good enough we won't worry about that, because it would really not be part of the script in question here. If you want to do that, PHP or whatever server side code is saving the shout text would be the way to go.

If you also add:

#dhtmltooltip table {
width: 200px;

It will keep the other tips, the one's whose shout texts have spaces, like they were.

01-03-2009, 07:18 AM
i have done!

adding "width: auto!important;" on tooltips.css just make the div grow as needed.
i want the div not auto.

so i follow your instrction about php.

yip, i'm familiar with php, but not familiar with javascript.
i have made the code and it works!