Results 1 to 3 of 3

Thread: Centering Image marquee crawler issue

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

    Default Centering Image marquee crawler issue

    Script URL (on DD): http://www.dynamicdrive.com/dynamici...wler/index.htm

    I am using this link to create a marquee that can be controlled left/right with the mouse. However, my the image starts changing directions 3/4 of the way across the screen rather than directly centered. In my case I have one image that I want to be 2000px wide while the div is 100% wide. I changed nothing to the site's javascript crawler file, so I cannot figure out what is happening and how to get this code to work for my situation.

    any help would be MUCH appreciated.


    Here is my code for the crawler and div:

    <div class="marquee" id="mycrawler2" style="width:100%;height:450px;">
    <img src="test.jpg" width="2000" height="450"/>
    </div>

    <script type="text/javascript">
    marqueeInit({
    uniqueid: 'mycrawler2',
    style: {
    'padding': '0px',
    'width': '2000px',
    'height': '450px'
    },
    inc: 50, //speed - pixel increment for each iteration of this marquee's movement
    mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
    moveatleast: 2,
    neutral: 500,
    savedirection: false
    });
    </script>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,004
    Thanks
    44
    Thanked 3,199 Times in 3,161 Posts
    Blog Entries
    12

    Default

    I don't think anyone has ever done just one image with this script. At least not and had a problem that they asked about it here.

    Anyways, even with a 'normal' crawler, you shouldn't specify style inline for the container.

    So try it without the highlighted:

    Code:
    <div class="marquee" id="mycrawler2" style="width:100%;height:450px;">
    <img src="test.jpg" width="2000" height="450"/> 
    </div>
    
    <script type="text/javascript">
    marqueeInit({
    uniqueid: 'mycrawler2',
    style: {
    'padding': '0px',
    'width': '2000px',
    'height': '450px'
    },
    inc: 50, //speed - pixel increment for each iteration of this marquee's movement
    mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
    moveatleast: 2,
    neutral: 500,
    savedirection: false
    });
    </script>
    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

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

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

    Default

    Thank you that worked!

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
  •