Marquee Replacement - Vertical Scroll
Instructions:
1: Copy and paste the following script in the HEAD section of your page:
Select all...
<script language="javascript"> //ENTER CONTENT TO SCROLL BELOW. var content='You
can
"put"
HTML
in
here
.'; var boxheight=100; // BACKGROUND BOX HEIGHT IN PIXELS. var boxwidth=120; // BACKGROUND BOX WIDTH IN PIXELS. var elementheight=40; // HEIGHT OF SCROLLING CONTENT IN PIXELS. EXPERIMENT TO GET THE BEST RESULT. var boxcolor="#FFF6e9"; // BACKGROUND BOX COLOR. var speed=80; // SPEED OF SCROLL IN MILLISECONDS (1 SECOND=1000 MILLISECONDS).. var pixelstep=2; // PIXELS "STEPS" PER REPITITION. var godown=false; // TOP TO BOTTOM=TRUE , BOTTOM TO TOP=FALSE var outer, inner; var w3c=(document.getElementById)?true:false; var ns4=(document.layers)?true:false; var ie4=(document.all && !w3c)?true:false; var ie5=(document.all && w3c)?true:false; var ns6=(w3c && navigator.appName.indexOf("Netscape")>=0)?true:false; var txt=(ns4)? '
' : '
'; txt+=(ns4)? '
'+content+'
' : '
'+content+'
'; txt+=''; document.write(txt); function scrollbox(){ if(ns4){ inner.top+=(godown)? pixelstep: -pixelstep; if(godown){ if(inner.top>boxheight)inner.top=-elementheight; }else{ if(inner.top<2-elementheight)inner.top=boxheight+2; }}else{ inner.style.top=parseInt(inner.style.top)+((godown)? pixelstep: -pixelstep)+'px'; if(godown){ if(parseInt(inner.style.top)>boxheight)inner.style.top=-elementheight+'px'; }else{ if(parseInt(inner.style.top)<2-elementheight)inner.style.top=boxheight+2+'px'; }}} window.onresize=function(){ if(ns4)setTimeout('history.go(0)', 400); } window.onload=function(){ inner=(ns4)?document.layers['outer'].document.layers['inner']:(ie4)?document.all['inner']:document.getElementById('inner'); if(ns4){ document.outer.clip.width=boxwidth; document.outer.clip.height=boxheight; inner.top=(godown)? -elementheight : boxheight-2; inner.clip.width=boxwidth-4; inner.clip.height=elementheight; document.outer.visibility="show"; inner.visibility="show"; }else{ inner.style.top=((godown)? -elementheight : boxheight-2)+'px'; inner.style.clip='rect(0px, '+(boxwidth-4)+'px, '+elementheight+'px, 0px)'; inner.style.visibility="visible"; } setInterval('scrollbox()',speed); } </script>
2: Edit the HTML text and adjust the various settings in the script to suit your taste.