Results 1 to 7 of 7

Thread: How do I make the scroller's background transparent

  1. #1
    Join Date
    Jan 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default How do I make the scroller's background transparent

    1) Script Title: Mike's DHTML scroller

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

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

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    I'm not sure, but maybe it would work if you added the following css rules:
    Code:
    #scroller0_baseLayer {
        background-color: transparent !important;
    }
    #scroller0_scrollLayer {
        background-color: transparent !important;
    }

  3. #3
    Join Date
    Jan 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hello, I appreciate you taking a stab at this. However, your suggestion had no effect on the scroller background.


    Craig

  4. #4
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    I guess I was a little hasty. But you may want to try to fiddle with the highlighted part of the script:
    Code:
    //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 !!

  5. #5
    Join Date
    Jan 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile Thank You azoomer!

    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

  6. #6
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    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

    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.

  7. #7
    Join Date
    Jan 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    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!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •