Connecting Tech Pros Worldwide Forums | Help | Site Map

whitespace

Newbie
 
Join Date: Sep 2008
Posts: 1
#1: Sep 14 '08
I want two spaces between two words, and doing <pre>the words</pre> changes the font to a font I don't want, and doing &nbsp; makes the space the incorrect size.

I need the words to be separated by EXACTLY two spaces and WITHOUT changing the font.

Does anybody know how to do this?

Expert
 
Join Date: Aug 2008
Posts: 397
#2: Sep 14 '08

re: whitespace


You can override the default font-family for pre by specifying the specific font you wish to use in the CSS-- providing the end user has it on their system. Exact two-space spacing between words with pre (even using word-spacing), cross-browser and cross-os, is yet another matter. I doubt there's a solution for that one. You are at the whim of the browser and/or os afaik.
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,754
#3: Sep 15 '08

re: whitespace


You could try using the "white-space: pre" style.
That shouldn't change the font but still render white-spaces in the same manner <pre> would.
Familiar Sight
 
Join Date: Jun 2008
Location: Sweden
Posts: 130
#4: Sep 15 '08

re: whitespace


http://www.htmldog.com/reference/cssproperties/word-spacing/

This is usefull
Reply