Kadrus
November 10th, 2007, 11:42 AM
<style type="text/css">
span
{
font:12px arial;
background:#CCCCCC;
position:absolute;
width:100;
height:500;
top:300;
clip:rect(0 100 100 0);
}
</style>
<script type="text/javascript">
var interval
startPosition=0
topPosition=100
endPosition=100
speed=50
function scrollit()
{
if (startPosition!=200)
{
startPosition=startPosition+1
topPosition=topPosition-1
document.getElementById('display').style.clip="rect(" + (startPosition + 1) + " 100 " + (startPosition + endPosition) + " 0)"
document.getElementById('display').style.top=topPo sition
interval=setTimeout("scrollit()",speed)
}
else
{
startPosition=0
topPosition=100
endPosition=100
interval=setTimeout("scrollit()",speed)
}
}
function stopinterval()
{
clearTimeout(interval)
}
</script>
<body onload="scrollit()" onunload="stopinterval()">
<span id="display" ><br /><br /><br /><br /><br /><br /><br />
A text here <br />
</span>
The problem that I am having here..is that i cannot figure a way how to align the span..
Anyone can help?
span
{
font:12px arial;
background:#CCCCCC;
position:absolute;
width:100;
height:500;
top:300;
clip:rect(0 100 100 0);
}
</style>
<script type="text/javascript">
var interval
startPosition=0
topPosition=100
endPosition=100
speed=50
function scrollit()
{
if (startPosition!=200)
{
startPosition=startPosition+1
topPosition=topPosition-1
document.getElementById('display').style.clip="rect(" + (startPosition + 1) + " 100 " + (startPosition + endPosition) + " 0)"
document.getElementById('display').style.top=topPo sition
interval=setTimeout("scrollit()",speed)
}
else
{
startPosition=0
topPosition=100
endPosition=100
interval=setTimeout("scrollit()",speed)
}
}
function stopinterval()
{
clearTimeout(interval)
}
</script>
<body onload="scrollit()" onunload="stopinterval()">
<span id="display" ><br /><br /><br /><br /><br /><br /><br />
A text here <br />
</span>
The problem that I am having here..is that i cannot figure a way how to align the span..
Anyone can help?