By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

whitespace

P: 1
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?
Sep 14 '08 #1
Share this Question
Share on Google+
3 Replies


Expert 100+
P: 397
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.
Sep 14 '08 #2

Atli
Expert 5K+
P: 5,058
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.
Sep 15 '08 #3

100+
P: 125
http://www.htmldog.com/reference/cssproperties/word-spacing/

This is usefull
Sep 15 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.