Results 1 to 8 of 8

Thread: Increasing space between words

  1. #1
    Join Date
    Mar 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Increasing space between words

    1) Script Title: Cross Browser marquee

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/cmarquee.htm

    3) Describe problem:
    Hi folks,


    How to add space between word? TIA


    B.R.
    satimis

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Using the CSS word-spacing property..
    Locate the var marqueecontent in your code and add changes:
    var marqueecontent='<nobr><font face="Arial"><span style="word-spacing:15px;">Thank you for visiting <a href="http://www.dynamicdrive.com">Dynamic Drive.</a> If you find this script useful, please consider linking to us by <a href="../link.htm">click here.</a> Enjoy your stay!</span></font></nobr>'
    See if it helps
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Mar 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rangana View Post
    Using the CSS word-spacing property..
    Locate the var marqueecontent in your code and add changes:


    See if it helps
    Hi rangana,


    Your advice works here. Thanks.


    Before posting I tried adding <tags.wordSpacing = 4> and </tags> on the places of your codes. It did not work.


    Furthermore if for city having 2 words, e.g. New York, the words will be spaced evenly as other words. What code shall I apply instead of combining NewYork together?


    B.R.
    satimis

  4. #4
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Before posting I tried adding <tags.wordSpacing = 4> and </tags> on the places of your codes. It did not work.
    --I'm not certain on wordpress, but have you tried <tags style="word-spacing:4px;">and</tags>

    Furthermore if for city having 2 words, e.g. New York, the words will be spaced evenly as other words. What code shall I apply instead of combining NewYork together?
    --Ideally, I should be industrious enough on dealing with this. I would separate NewYork from the <span>. Something like:
    Code:
    <span style="word-spacing:4px;">My Favorite City is</span> NewYork. <span style="word-spacing:4px;">How about yours?..</span>
    Hope make some sense
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  5. #5
    Join Date
    Mar 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rangana View Post
    --I'm not certain on wordpress, but have you tried <tags style="word-spacing:4px;">and</tags>
    Your advice works for me. Thanks.


    --Ideally, I should be industrious enough on dealing with this. I would separate NewYork from the <span>. Something like:
    Code:
    <span style="word-spacing:4px;">My Favorite City is</span> NewYork. <span style="word-spacing:4px;">How about yours?..</span>
    Oh sorry for not explaining clear on my late posting.


    My question was supposing the complete line is only cities, say 80 cities. If some cities having 2/3 words is there a clue to link them together after space between words increased? Thanks


    Edit;

    Or add underscore "_" linking the words and make the underscore invisible?


    B.R.
    satimis
    Last edited by satimis; 03-07-2008 at 04:02 AM. Reason: adding info

  6. #6
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    If that is the case, you could shift from the word-spacing property to white-spacing property..

    Use the pre.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  7. #7
    Join Date
    Mar 2008
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by rangana View Post
    If that is the case, you could shift from the word-spacing property to white-spacing property..

    Use the pre.
    I still need word-spacing. Only some cities have 2/3 words


    B.R.
    satimis

  8. #8
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    I don't see another way around than using separate <span>s.
    Code:
    <span style="word-spacing:4px;">My Favorite City is</span> NewYork. <span style="word-spacing:4px;">How about yours?..</span>
    ...or the word-spacingre; trick. Maybe other members can provide another alternative.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

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
  •