Help - Search - Members - Calendar
Full Version: How To Replace Spaces In Code
MonsterSmallBusiness Forums > MonsterCommerce > How do I?
TNTGram
If I have this:
CODE
a couple words     a couple more words     a couple last words

Is there a way in CSS to space out the word phrases a little without repeating the non breaking space code?
tazzzzam
QUOTE(TNTGram @ Apr 26 2005, 07:36 AM)
If I have this:
CODE
a couple words     a couple more words     a couple last words

Is there a way in CSS to space out the word phrases a little without repeating the non breaking space code?
[right][snapback]75193[/snapback][/right]


Yea, let me know as well!

Gary
Bigfoot_is_Blurry - MC Team
You should be able to put the text in span tags and then use the padding-left/padding-right or margin-left/margin-right properties in css.

In your example, you would have 3 span tags (one for each section of text that you want spaced). You might want to give them separate classes so you can adjust each section of text differently.

I'm not sure if this is the best way to do this. Maybe someone will post a better solution.

Hope this helps.

-Matt
Kman
well if your typing the text in html, just hit your space bar for a space - you don't need to use a " " for text.

unless I'm not understanding the question properly
TNTGram
Thanks for the answers so far.
Kman, to be clear I want to put multiple (3 to 6) spaces between phrases. I don't think you can use your space bar multiple times since html only reads one. I was just trying to lighten up the code with something simpler than the "& nbsp ;" (without spaces) repeated multiple times.
Kman
ya your right - but I don't think there is an easier method.
ebenson
I can think of a couple of other options that may be more flexible than spans. Could you post a direct reference for us to look at?
tazzzzam
QUOTE(Kman @ Apr 26 2005, 01:54 PM)
well if your typing the text in html, just hit your space bar for a space - you don't need to use a " " for text.

unless I'm not understanding the question properly
[right][snapback]75249[/snapback][/right]


Hey KMan,

Actually if you don't want your left margin categories against the edge, you have to nbsp them.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.