PDA

View Full Version : Increasing space between words



satimis
03-06-2008, 08:18 AM
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

rangana
03-06-2008, 09:02 AM
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 :D

satimis
03-06-2008, 12:25 PM
Using the CSS word-spacing property..
Locate the var marqueecontent in your code and add changes:


See if it helps :D
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

rangana
03-07-2008, 12:36 AM
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:


<span style="word-spacing:4px;">My Favorite City is</span> NewYork. <span style="word-spacing:4px;">How about yours?..</span>


Hope make some sense ;)

satimis
03-07-2008, 03:58 AM
--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:


<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

rangana
03-07-2008, 04:20 AM
If that is the case, you could shift from the word-spacing property to white-spacing property. (http://www.w3schools.com/css/pr_text_white-space.asp).

Use the pre. ;)

satimis
03-07-2008, 05:31 AM
If that is the case, you could shift from the word-spacing property to white-spacing property. (http://www.w3schools.com/css/pr_text_white-space.asp).

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


B.R.
satimis

rangana
03-07-2008, 05:52 AM
I don't see another way around than using separate <span>s.


<span style="word-spacing:4px;">My Favorite City is</span> NewYork. <span style="word-spacing:4px;">How about yours?..</span>


...or the word-spacing:pre; trick. Maybe other members can provide another alternative. ;)