PDA

View Full Version : Textual Tooltip II Help



mohamed930
06-09-2008, 03:30 PM
1) Script Title: Textual tooltip II (fade into view)

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

3) Describe problem:
How can I make the tooltip in the center of the page? I've tryed to do several things to get it to do this; but none of them would work...

This is the peice of code where the text tooltip will show:

<script language="JavaScript1.2">
if (document.layers){
document.write('<ilayer name="nscontainer" width="100%" height="100">')
document.write('<layer name="fade1" width="100%" height="100">')
document.write('</layer></ilayer>')
}
else
document.write('<DIV ID="fade1"></DIV>')

</script>

And I've tryed to put this peice of code in a
<p align="center">SCRIPT</p> tag, but that also wouldn't work...

I've also tried to make the actual link align center.. e.g:

<p><A HREF="http://www.wsabstract.com" onMouseOver="fade_up('fade1','<FONT SIZE=4 FACE=Verdana Align=Center>Visit WA for comprehensive JavaScript tutorials and over 400+ free scripts!</FONT>','000000')" onMouseOut="fade_down('fade1')">Website Abstraction</A> (notice the align=center... I just guessed that! (ofcourse, i guessed wrong :()

But even that wouldn't work!
And now, after doing my best- I turn my head to the communtiy here:
Can anyone help?!

Thanks for all your help!

Minos
06-09-2008, 04:17 PM
Well, you could try adding



<style type="text/css">
fade1{
margin-left: auto;
margin-right: auto;
}
</style>

Above the FadingText() script.

mohamed930
06-09-2008, 06:00 PM
Well, you could try adding



<style type="text/css">
fade1{
margin-left: auto;
margin-right: auto;
}
</style>

Above the FadingText() script.

OK! I got it to work!!!
I followed your instructions, (to be honest, it didn't work), but i found a way around the problem
I shoved the script into a table of three columns, and then into a DIV, and then redifined the div IN THE ACTUAL SCRIPT...
Take a look:

<table cellpadding="0" cellspacing="0" style="width: 100%">
<tr>
<td>&nbsp;</td>
<td>
<div>
<script class="fade1" language="JavaScript1.2">
if (document.layers){
document.write('<ilayer name="nscontainer" width="100%" height="100">')
document.write('<layer name="fade1" width="100%" height="100" class="fade1" align="center">')
document.write('</layer></ilayer>')
}
else
document.write('<DIV ID="fade1" align="center" class="fade1"></DIV>')

</script>
</div>
</td>
<td>&nbsp;</td>
</tr>
</table>

Notice the <DIV ID="fade1" align="center" class="fade1"></DIV> additions in the <script></script> tags...

Horray!
Thanks for your help