Search code examples
htmlcssmousemarquee

Why does the marquee not stop when I press the mouse button down?


This is my code

<marquee scrollamount="3" onmouseover="this.stop()" onmouseout="this.start()"> 
  This is the marquee
</marquee>

This piece of code doesn't seem to get validated either.


Solution

  • This would work I think

    <marquee  onmouseover="this.scrollAmount = 0" onmouseout="this.scrollAmount = 3"> This is the marquee</marquee>
    

    But please note, the marquee tag should not really be used anymore as it is or will be deprecated soon, and should only work on old browsers. It may still work for now, but probably wont work for much longer. This type of text formatting should really be done in JS. Hope this helps :)