Results 1 to 5 of 5

Thread: Cross Browser Marquee Problem

  1. #1
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Cross Browser Marquee Problem

    1) Script Title: Cross Browser Marquee

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

    3) Describe problem: How do I center this scroller in my table? No matter what ai do it's always on the left.
    Thanks, Jim

  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

    Impossible to say without seeing the page. In most cases adding the highlighted inside the script should do it:

    Code:
    document.write('<table style="width:'+marqueewidth+'" align="center" border="0" cellspacing="0" cellpadding="0"><td>')
    The line you are looking for unedited looks like so:

    Code:
    document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
    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. The Following User Says Thank You to jscheuer1 For This Useful Post:

    egghead2000 (05-03-2010)

  4. #3
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Thanks!
    Here's another problem.
    Why does the scroller appear twice the heigth I epecified? I specified a heigth of 29px and you can see what I got. Also do you know why my site expands on opening then closes to the correct size of 850px. It started happening when I started adding scripts from DD.
    Thanks again, Jim
    http://www.noahsvideo.com/!!default.html

  5. #4
    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

    The marquee is 29px high. Add this to your stylesheet temporarily and you will see that:

    Code:
    #iemarquee {
    background-color: red;
    }
    The things that are taller are the containing and other td tag in that row. I see you have them set to 29px height also, but something is forcing them to be taller. I think it is this, in your source code, at the end of the marquee script:

    Code:
    }
    document.write('</td></table>')
    }
    }
    </script>&nbsp;</td>
    Coming after the script generated table, that would force a line break, adding 1em (this varies depending upon the prevailing font size at that spot in your markup) of height to the cell. That could easily account for what you are observing. Try getting rid of it.

    About the page jumping around, I'm not 100% sure why that's happening but I have an idea it may be the crawler. If so, you should be able to surround the crawler division (the one with the id of mycrawler2) with another, set this other division's width to that of the crawler, set its overflow to hidden.

    This jumping about (from crawler) only happens in IE with a crawler in a table. In IE 8, if you have a valid URL DOCTYPE, it won't happen. That's what makes me think it's the crawler, because the page is fine in other browsers, and fine in IE 8 when I set the mode to strict.
    - John
    ________________________

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

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

    egghead2000 (05-04-2010)

  7. #5
    Join Date
    Jun 2007
    Location
    North Lake Tahoe
    Posts
    62
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I'' give your suggestio a try.
    Jim

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
  •