Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I would like to add space to some phrases using CSS word spacing.
Is there a way to do "phrase-spacing" ???
How do I code, for instance "Man with briefcase " 15em "Night Lights" 15em "At Home"?
Might also add that I am not a coder, so any direction will be appreaciated.
Thanks,
lucky1

Easy enough. You just need to set the word-spacing to 15em for the spaces between the phrases. You can use span tags to identify a certain portion of text that you want to apply a property to. It would look like this:
Man with briefcase<span style="word-spacing:15em;"> </span>Night Lights<span style="word-spacing:15em;"> </span> At Home
(Note: there is a single space between the sets of span tags)
Or, if you will need to apply that property in more than a couple places, you can create a named style. For instance:
Put this in the head of your document
<style>
.wrdSpc {word-spacing:15em;}
</style>Then in your document you would just use span tags as follows:
Man with briefcase<span class="wrdSpc"> </span>Night Lights<span class="wrdSpc"> </span> At Home
This way if you ever need to change the value of the spacing throughout the document, you just need to change the value in the head of the document.
Michael J

Hi Michael J,
A million thanks to this forum and to all who make it work.
It never occured to me to use span for the spaces.
It works and so simple !!!!!
lucky1

![]() |
help! php emails me,Retur...
|
Show content without load...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |