Jump to content

Scrolling Text


Nim199

Recommended Posts

Hello Everybody,How can I format text to scroll like the marquee statment, without using the HTML tag, or is it possible.Thanks for reading!

Link to comment
Share on other sites

Do you want something like this - http://www.iribbit.net/i/_files/javascript-snippets.htm. the slidinig navigation one??If yes then here is the code -

<!--// author: prateek// description: Navigation effect that slides the link from left to right a certain amount of pixels.// necessary mods: nonefunction shiftMe(object, direction, pixels){	if (pixels==0)return;	var obj = document.getElementById(object);	if (obj.style.marginLeft=="") obj.style.marginLeft="0px";	var marginLeftVal=obj.style.marginLeft;	var marginLeftInt=new Array();	marginLeftInt=marginLeftVal.split('p');	if (direction=="r")	marginLeftInt[0]--;	if (direction=="l")	marginLeftInt[0]++;	pixels--;	obj.style.marginLeft=marginLeftInt[0]+"px";	timer=setTimeout('shiftMe("'+object+'","'+direction+'",'+pixels+')',1);}-->

<div id="main"><a href="google.com" id="h2" onmouseover="shiftMe('h2','r',7)" onmouseout="shiftMe('h2','l',7)">Google</a><br><a href="google.com" id="h3" onmouseover="shiftMe('h3','r',7)" onmouseout="shiftMe('h3','l',7)">Google</a><br></div>

Link to comment
Share on other sites

Do you mean so it scrolls down your site in a certain speed?
Both speed, and how. Not on mouseover.
Link to comment
Share on other sites

  • 1 month later...

The W3C validator rejects the <marquee> tag and says that it can be replaced using CSS. I don't quite understand how you can make text scroll left-right with CSS. Is it possible?

Link to comment
Share on other sites

The W3C validator rejects the <marquee> tag and says that it can be replaced using CSS. I don't quite understand how you can make text scroll left-right with CSS. Is it possible?
Not with CSS alone, you need a combo of CSS and Javascript. Check out dynamicdrive.com, they have a few different scripts to choose from for sliding text.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...