Remember, you cannot justify text if it doesn't wrap without the aid of the <br> tag. With that in mind, to add text-align styling to these messages, you can do it right on the page in the addItem area, here are a few ways (from the demo):
Code:
myScroller1.addItem("<div style='text-align:center;'><b>Click here for <a href='http://dynamicdrive.com'>Dynamic Drive</a>, the net\'s #1 DHTML site!</b></div>");
myScroller1.addItem("<center><b>Visit <a href='http://www.brainjar.com'>Brain Jar</a>, Mike\'s great coding site!</b></center>");
myScroller1.addItem("<div style='text-align:right;'><b>Looking for free JavaScripts? Visit <a href='http://javascriptkit.com'>JavaScript Kit.</a></div>");
If you already have some of these messages wrapping without using the <br> tag, you can justify their text by putting this tag around it:
<div style='text-align:justify;'>text and other tags can go here</div>
example:
Code:
myScroller1.addItem("<div style='text-align:justify;'>text and other tags can go here</div>");
Bookmarks