Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertical Marquee remove space

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>

like image 612
Alfred Avatar asked Mar 24 '26 02:03

Alfred


1 Answers

  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.
like image 140
Rodaine Avatar answered Mar 26 '26 14:03

Rodaine