Script:Pausing up-down message scroller
http://www.dynamicdrive.com/dynamicindex2/crosstick.htm
Is there anyway I can add some padding to the messages, so they don't butt right up against the edge of the message box?
Thank!
Script:Pausing up-down message scroller
http://www.dynamicdrive.com/dynamicindex2/crosstick.htm
Is there anyway I can add some padding to the messages, so they don't butt right up against the edge of the message box?
Thank!
Yes. First you need to take back a bit of the layout control from the script. Near the end, you will see these lines:
Get rid of the red parts.Code:document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">') document.write(messages[0]) document.writeln('</div>') document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
Now you can control these divisions from a style section that you can put in the head of the page (for example):
The important thing to note is that 140px is 10px less than the scroller width as set in the script's configuration:Code:<style type="text/css"> #main2 div div { margin:0 5px; width:140px; } </style>
This gives us 5px on either side for our margins as declared in the style section. If you use a different width scroller, adjust things accordingly.Code:var scrollerwidth='150px'
Last edited by jscheuer1; 03-04-2006 at 09:13 PM. Reason: add closing style tag
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Thanks! That's a great solution.
Wow looking at this script it sure contains a lot of ugly and legacy code. But then again, I think this was one of the very first scripts I added to DD many years ago.
I'll rewrite this script and probably post the new version sometime this week.![]()
Bookmarks