Wednesday, April 11, 2012

HTML marquee height - fixed

HTML marquee tag supports height attribute. If you want your text to scroll from bottom to top of your screen just define height attribute to the marquee tag and you are done.

Static solution:
<marquee direction="up" height="600">Scroll in 600 height area</marquee>

Dynamic solution with jquery
<marquee direction="up">Scroll in 100% height of my document</marquee>

The jQuery

<script src="" type="text/javascript"></script>

<script type="text/javascript">
    var windowHeight = document.documentElement.clientHeight;