Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

extra spaces between text not being recognized 1

Status
Not open for further replies.

zmountainman

Technical User
Nov 24, 2006
3
0
0
CA
Hello All!
I am obviously new at GoLive and CSS because I can't seem to put intentional extra spaces between words if I want to. In the Source code there are spaces but none show up in Layour or Preview. It seems so trivial that I assume I'm missing something fundamental. Any help would be greatly appreciated.
Cheers, Z
 
One of html's rules is that white space collapses to a single space. That means that no matter how many spaces, tabs or returns you put in the source code the browser will only render one space.

There are ways around this, including but not limited to hard coding the spaces. This to insert the character code for a space. In GoLive's layout window this is done by holding down the shift key as you type the spaces.

Give it try. Hold shift and space a few time then switch to source code and you'll see the character code for spaces.

FYI: To hard code returns use shift + Enter.
 
Hi wiser3,
That doesn't seem to work. If I'm in the layout window and hold the shift key down and hit the space bar a couple of times in between words and then switch to Souce, nothing but spaces shows up between the words and when I switch back to Layout, the words have come back together! Maybe my GoLive is a few bits short of perfect?
Thanks for the suggestion nonetheless. It's good to know about hard coding spaces and returns...even if it didn't work for me this time...
Cheers,
Z
 
Hmmmm.... i don't know why that didn't work. GoLive has done hard spaces like that at least since version 6.

Here's the character code for hard spaces:
Code:
 

You can as many as want in the source code.

You can also use CSS to affect word spaceing:

To increase word spacing of all paragraphs;
p { word-spacing: 1em }

To increase word spacing of a area spanned by a class;
.openspace { word-spacing: 1em }

To increase word spacing of an area spanned by a class and that must inside a paragraph;
p.openspace { word-spacing: 1em }

You can do the above in the source code or with GoLive's CSS editor. Exactly how to do it with the CSS editor would depend on which version of GoLive your using.
 
Hi wiser3,

Thanks very much for the help on this one. All of those tips are helpful.

Cheers,

Z
 
I have a similar problem i thoughtmy problems came to a end when I saw wiser3's post - his solution of shift + spacing worked perfectly! BUT only in GoLive if I layout preview or open it in my default browser(which is html)- how ever when I open the file as HTML the spaces are replaced with "Â Â Â Â Â" - so that would repersent 5 spaces - plzzz help!!!!!!!
 
If your seeing odd characters like that - you have encoding problems. Differant browsers use different encoders by default, but If you specify which character encoding to use you can be sure to get the results you want.

GoLive sets a character encoding by default, but different version of GoLive have different default encodings. As a result a lot of people have problems when changing GoLive versions.

Check for the following meta tag in the head of your documents. This will set the encoding type to utf-8, which is the least likely to give you any problems.
< meta http-equiv="content-type" content="text/html;charset=utf-8" />

If you have it set to something else change it to utf-8 and check a few pages for problems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top