Back to the main page

Scrolling Text


One small step for a man, a giant leap for mankind.


One important difference when you use text is that SmoothDivScroll can't calculate the width like it can with images, div's or other elements that have fixed widths. Therefore you have to give the text elements a fixed width in your CSS. If anyone can figure out a way to dynamically calculate the width of a text element, please let me know!

Here's the CSS for the p-tag that I have put inside SmoothDivScroll in this example:

	
	#scrollingText div.scrollableArea *
	{
		display: block;
		float: left;
		margin: 0;
		padding: 0px 0px 20px 20px;
		font-family: Verdana, Arial, Sans-Serif; 
		font-size:75px; 
		font-weight: bold; 
		background-color: #000; 
		color: #fff;
		/* Fixed width! */
		width: 2200px;
	}
	
	
Back to the main page