Results 1 to 3 of 3

Thread: Mike's DHTML scroller - how to JUSTIFY your text messages

  1. #1
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Mike's DHTML scroller - how to JUSTIFY your text messages

    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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>");
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1
    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>");
    ToJOHN,

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •