Results 1 to 2 of 2

Thread: Text and image crawler fixed width problem

  1. #1
    Join Date
    May 2010
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Text and image crawler fixed width problem

    1) Script Title: Text and image crawler

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

    3) Describe problem: According to the notes:

    Marquees whose specified or default width is greater than their contents will be automatically shrunk to avoid empty spots.

    Whilst this is a useful feature it is actually the opposite if what i need. I need to specify a fixed width for the marquee and if the content is not as wide as the marquee i want that gap rather than having the marquee width reduced.

    I have been digging through the .js file but being completely rubbish with javascript i can't work out how to stop it shrinking the width.

    Other than that the crawler is perfect for what i need and i would rather not switch to another scroller as they don't have the same "mouse driven" feature.

    Any help anyone can offer would be great!
    Last edited by beaker; 05-10-2010 at 09:56 AM.

  2. #2
    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

    Browsers cannot scroll content that is too short to fill the space it is scrolling in. They will simply run out of things to show.

    If you want something like that with a gap to fill out the empty space, just place a span or blank image of the desired width into the contents. For example:

    Code:
    <div class="marquee" id="mycrawler2">
    <img src="blank.gif" width="300"><img src="http://i40.tinypic.com/9tlic8.jpg"> <img src="http://i43.tinypic.com/1zbqs5t.jpg"> <img src="http://i44.tinypic.com/2419ul3.jpg"> <img src="http://i43.tinypic.com/296nh3r.jpg"> <img src="http://i40.tinypic.com/mk7ki.jpg">
    </div>
    Where blank.gif is a transparent .gif image, adjust the width attribute as needed. There are various ways.

    On the other hand you, if want continuous scrolling even though there isn't enough content to fill out your desired width, repeat all or some of the images you do have.
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    beaker (05-10-2010)

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
  •