View Full Version : Right script..wrong place?

11-16-2005, 10:51 PM
Hello Everyone,

I have a script that I'm using Mike's DHTML scroller in my page from:

and it works great BUT not in the right spot in my page. It always shows in the top of bottom, never in the middle? My code is in the link below, any ideas because I've run out of my own.


Thank you in advance!!!!

11-17-2005, 06:47 AM
First off it is a wonder the script works at all. It doesn't in FF, and it is supposed to. Anyways, you have two body tags on your page. A big no no. You also have two separate onload events, another no no. To fix these, change the first body tag, that now looks like so:

<div id="tempholder"></div>

to this:

<body bgcolor="black" onload="CSScriptInit();runmikescroll();">
<div id="tempholder"></div>

Remove this line from Mike's DHTML scroller script (the part on the page, thankfully):


And remove this other body and associated erroneous tags completely:



Now we are ready to go to work on your question. Find this line (it is just above where that last bit we removed was, and just after the script):

<div id="placeholder" style="position:relative; width:420px; height:32px;"> </div>

Change it to this:

<center><div id="placeholder" style="position:relative; width:420px; height:32px;top:30px;"> </div></center>

Notice the top:30px; part I added, that gets the scroller into a better position vertically, I think. The higher this number, the lower down the page the scroller will appear.

11-18-2005, 12:39 AM

Thank you for taking the time to answer my question, I really appreciate it! It worked great! Keep up the great work, novices like myself really appreciate the extra time to kinda explain where they went wrong.

Many Thanks John!!