Search code examples
htmlmarquee

the marquee tag in html works well for horizontal direction but not for vertical direction


The marquee tag works for horizontal direction perfectly but when I set its direction to up or down, what happens is that the picture scrolls only half way down the screen/page. I want it to scroll all the way till the bottom of the page but it does not. why?

    <html>
        <marquee behavior="scroll" direction="down">
           <img src="Blue Hills.jpg" />
           <img src="Water lilies.jpg" />
           <img src="Sunset.jpg" />
        </marquee>

   </html>

Solution

  • The marquee attribute height="100%" should do the trick.

    Please note that the height of the marquee is relative to the container inside the marquee resides. In your case that you don't have any containers the marquee will occupy the whole screen

    marquee tag is actually an old-styled HTML technique that AFAIK is not used in modern web-sites.

    Nevertheless, if you really want such an animation you should consider reviewing jQuery alternatives such as jScroller