views:

152

answers:

4

There is em dash and en dash. Is there an "en" equivalent to   ? Is there an en equivalent to pure Ascii 32?

I want a better way to write this:

123<span class="spanen">&nbsp;</span>456<span class="spanen">&nbsp;</span>789

or this:

123<span class="spanen"> </span>456<span class="spanen"> </span>789
+3  A: 

&thinsp; (thin space) should do

and &nbsp; has not the same with as an &mdash; (—), to separate numbers you should use a narrow no-break space (U+202F).

as others have mentioned, you are better off using the css property word-spacing to define the width of your spaces. it's probably a good idea to combine it with white-space:no-break;

knittl
this was exactly what i was looking for in the first place. but i accepted the css answer, because it is even better and is also answering the question how i wrote it.
as i said in my answer: go with word-spacing and white-space properties
knittl
+4  A: 

The Unicode character U+2002 EN SPACE (&#x2002;, &#8194; or as entity reference &ensp;) is a space with en width.

Gumbo
same here: this is exactly what i was looking for in the first place. but i accepted the css answer, because it is even better and is also answering the question how i wrote it.
+1  A: 

You could alter your CSS in such:

.spanen{word-spacing:.6em;}
austin, thank you. this is quite the same as the accepted answer. the other was earlier, so what can i do
+1: pardon, but mine wasn't earlier. When I posted my answer I saw austin's, and the only reason I didn't delete mine was that I felt mine was a bit more complete.
ANeves
No problem, I completely understand.
+3  A: 

Don't use hacks that make no sense. If you wish to separate some words, I suggest you use the CSS property word-spacing:

<span class="strangeNumbers">123 456</span>

.strangeNumbers {
  word-spacing: 0.5em;
}
ANeves
do you know if all modern browsers do this?
Yes, they do, even IE6.
Boldewyn