PDA

View Full Version : How do I make the scroller's background transparent



craigt56
01-21-2011, 07:09 PM
1) Script Title: Mike's DHTML scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/mikescroll.htm

3) Describe problem: I want to get rid of the scroller's background. I want to make it completely transparent. Thanks!

azoomer
01-21-2011, 07:45 PM
I'm not sure, but maybe it would work if you added the following css rules:


#scroller0_baseLayer {
background-color: transparent !important;
}
#scroller0_scrollLayer {
background-color: transparent !important;
}

craigt56
01-21-2011, 10:41 PM
Hello, I appreciate you taking a stab at this. However, your suggestion had no effect on the scroller background.


Craig

azoomer
01-21-2011, 11:07 PM
I guess I was a little hasty. But you may want to try to fiddle with the highlighted part of the script:


//SET SCROLLER APPEARANCE AND MESSAGES
var myScroller1 = new Scroller(0, 0, 480, 32, 1, 5); //(xpos, ypos, width, height, border, padding)
myScroller1.setColors("#006600", "#ccffcc", "#009900"); //(fgcolor, bgcolor, bdcolor)
myScroller1.setFont("Verdana,Arial,Helvetica", 2);
myScroller1.addItem("<b>Click here for <a href='http://dynamicdrive.com'>Dynamic Drive</a>, the net\'s #1 DHTML site!</b>");
myScroller1.addItem("<b>Visit <a href='http://www.brainjar.com'>Brain Jar</a>, Mike\'s great coding site!</b>");
myScroller1.addItem("<b>Looking for free JavaScripts? Visit <a href='http://javascriptkit.com'>JavaScript Kit.</a>");
myScroller1.addItem("<b>Discuss and get help on web coding, at <a href='http://www.codingforums.com'>CodingForums.com</a></b>");

Yeah, I know, many good ideas !!

craigt56
01-21-2011, 11:38 PM
Many apologies to you azoomer, your first suggestions works just fine! Is was working on another website along with the one that a had this question with, and added your suggestion to the wrong css! Thank you so much!


Craig

azoomer
01-21-2011, 11:48 PM
Well that's good. In the meantime I found that changing the last two colors (in the above red line) to transparent also does the trick.
Here is a demo (http://azoomer.com/scroller/)

By the way, the script is a bit old and I don't think it will validate as it is. Also,when I added a doctype ( xhtml transitional) it wouldn't work.

craigt56
01-23-2011, 02:57 AM
Very true azoomer. I did get it to validate for HTML and CSS but xhtml transitional just wouldn't validate. I think I might try to find a more updated script. Thanks again my friend!