PDA

View Full Version : Mike's DHTML scroller - how to JUSTIFY your text messages



jako_yellow
09-27-2005, 04:43 PM
Hello

I'm using the Mike's DHTML scroller
But now I want that my messages (my newslines) will be outlined as JUSTIFY

And I really tried hard to find the right code but it does'nt work.

Can someone tell me please how I can become this result?
As you can see if you use the code, he aligns the messages LEFT

How can we change this by ourselves tot center, right or JUSTIFY?

I hope someone can and will help me

Tnx a lot

jscheuer1
09-27-2005, 08:08 PM
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):

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:

myScroller1.addItem("<div style='text-align:justify;'>text and other tags can go here</div>");

jako_yellow
09-28-2005, 06:58 AM
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):

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:

myScroller1.addItem("<div style='text-align:justify;'>text and other tags can go here</div>");

ToJOHN,

I really thank you for this!!! It really works, I'm very happy and again, thanks a lot!!!