Results 1 to 7 of 7

Thread: Need help with scroller ... please

  1. #1
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Need help with scroller ... please

    1) Script Title: Translucent Scroller

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

    3) Describe problem: I am trying to add this scroller to my page to display banners as opposed to text links. I know how to do the <a href="whatever"><img src="whatever"> part, and I know to change the height and width above that part to the size of the banner I need displayed.

    My problem is when I put the code on my page, instead of centering, it pushes right and cuts half of the banners off. This only happens in IE. In Firefox, it displays properly.

    Can anyone help me?

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    How are you currently centering the script? Since this script uses relative positioning, in IE, you may need to tweak it a bit to get it working right. You may want to view previous threads on this.

  3. #3
    Join Date
    Feb 2007
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    where the "document.write('<div " is added, try adding <center> to the start and </center> at the end of the expression(at the end of where /div is ). worked for me in both FF an IE

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Well there's certainly no need to use the CENTER tag, which is deprecated anyway. You can center any a piece of content in general in HTML using a DIV tag:

    Code:
    <div style="margin: auto; text-align: center">
    HTML here
    SCRIPT HERE etc
    </div>

  5. #5
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the answers, but I'm still having problems. DD, I did read several threads about this scroller. I used the search feature and found some other threads about this scroller. I also tried putting that stuff you said to put, but it still didn't work.

    Neural, I do not know where exactly to put the center. Can you show me where?

    document.write('<div style="position:relative;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden"><div id="canvas0" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')
    Can you show me where exactly? I'm sorry, I have limited html knowledge and no javascript knowledge whatsoever.

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    From the demo page, addition red:

    Code:
    if (ie4||dom)
    document.write('<div style="margin:0 auto;position:relative;width:'+scroller_width+';height:'+scroller_height+';overflow:hidden"><div id="canvas0" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div><div id="canvas1" style="position:absolute;background-color:'+bgcolor+';width:'+scroller_width+';height:'+scroller_height+';top:'+scroller_height+';filter:alpha(opacity=20);-moz-opacity:0.2;"></div></div>')
    else if (document.layers){
    document.write('<ilayer id=tickernsmain visibility=hide width='+scroller_width+' height='+scroller_height+' bgColor='+bgcolor+'><layer id=tickernssub width='+scroller_width+' height='+scroller_height+' left=0 top=0>'+scrollercontent[0]+'</layer></ilayer>')
    }
    To prevent the 1/2 cut off problem, remove all text-align:center and align="center" and <center> that contain the scroller. To work in IE your page requires at least a loose transitional DOCTYPE before the opening <html> tag:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you jscheuer1 for your help. My rotatating banners are displaying properly now.

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
  •