Vertical Marquee remove space

Alfred picture Alfred · May 3, 2012 · Viewed 13.9k times · Source

I want to include some vertical marquee text to my page <div> so that the content will be automatically scrolled.

I found the following code useful;

<marquee behavior="scroll" direction="up" height="250" scrollamount="2" scrolldelay="10" onmouseover="this.stop()" onmouseout="this.start()">
content goes here<br>
content goes here<br>
content goes here<br>
content goes here
</marquee>

But it adds a white space after the contents. The content re appear only after the whole text scrolled up (something like restart). How can I avoid (or remove) this blank space?

I found it here in Stack Overflow and there is something noted cloneNode(). I don't know how to implement that.

*Note: Height attribute is not relevant. it has same height of parent <div>

Answer

Rodaine picture Rodaine · May 3, 2012
  1. The <marquee> element is non-compliant HTML and should not be used...but that is a whole different argument.
  2. By its nature, the element will scroll all the way through the content before looping it again.
  3. There are javascript based solutions that you can use that will do the same thing but with continuous looping.