Jump to content

Scrolling Marquee


amitamberker

Recommended Posts

Hi All,How do I get-ride of that big gap (space) after the "The Tourist..."? I do not want that GAP (Space) after the The Tourist...Please help...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Scrolling Marquee Without The Space</title></head><body><table style="width: 800px" cellspacing="0" cellpadding="0" align="center"><tr><td bgcolor="yellow"><marquee onmouseover="java script:this.stop()" onmouseout="java script:this.start()" scrollamount="4" scrolldelay="10">a quick brown fox jumps over the lazy dog... 123456789... Bond 007... The Last Airbender... What Happens In Vegas... The Tourist...</marquee></td></tr></table></body></html>
Link to comment
Share on other sites

The reason people are ignoring your thread may be that your whole page revolves around deprecated or incorrect HTML. <marquee> is not proper HTML, attributes such as "align" and "bgcolor" are deprecated and should be left aside in favor of stylesheets. Besides that, I wouldn't use tables for that, if you just want a box, a <div> element works.There is no quick fix to make the marquee not have space at the end. The marquee is programmed to scroll content to the left until it is out of view.In order to make it repeat without leaving a long space in between, the content would either have to be duplicated or cut up and rearranged. The only way to fix the problem is to actually program a marquee from scratch with Javascript. While you're at it, you can get rid of the <marquee> tag and use a different element for Javascript to work with.

Link to comment
Share on other sites

  • 8 months later...

Hi Ingolme,So, how do I program a marquee from scratch with Javascript? Could you please send me the Code and explain how to incorporate it?

Link to comment
Share on other sites

I don't write code for people because there's no compensation for it and you wouldn't learn. You can learn to do it yourself or hire somebody to do it for you. Programming a marquee that doesn't leave a gap is really complicated.The content needs to be duplicated as many times as necessary to cover the gap, and then needs to appear to scroll smoothly by resetting the position in the exact moment that the content has moved too far left. To do this task, you'll have to learn Javascript timing, CSS positioning, the style object and how to duplicate content using DOM methods or innerHTML. You'll also need to know how to detect the position of content so that you can know when to reposition it using offsetLeft.

Link to comment
Share on other sites

Oh! I see... Then I shall just SLEEP-ON with what-ever I have. Thanks a lot Ingolme.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...