I'm trying to fix up some code on a site i'm working on. The site is using non-breaking spaces(
) and that is breaking the the flow a tiny bit on the mobile site so I want to replace them with a normal space. This fixes the mobile site, but seems to reduce the distance between the affected images on the actual site. Are non breaking spaces bigger than normal spaces? If so, how can I fix this issue while maintaining the normal distance between images on the site?
Asked
Active
Viewed 1,547 times
2

samuraiseoul
- 2,888
- 9
- 45
- 65
-
1possible duplicate of [Width in pixel of in span and iframe body](http://stackoverflow.com/questions/13839046/width-in-pixel-of-nbsp-in-span-and-iframe-body) – Eric J. Aug 08 '13 at 22:36
-
You mention "distance between images" – are you using space characters as horizontal "spacers" in-between images? If so, can you not use CSS margins instead? For example, setting `margin-right: 10px;` on an image will give you a 10 pixel margin on the right, and allows you to specify the margin precisely, without worrying about the size of space characters. – TachyonVortex Aug 08 '13 at 22:51
1 Answers
-1
You should consider changing your font
, or using HTML <pre>
tags, or CSS's white-space:
.

StackSlave
- 10,613
- 2
- 18
- 35
-
YEah, @Eric J.'s answer had something similar to this, white-space: prewrap; seems to have fixed it. They had a double @nbsp;@nbsp; and so replacing them with two spaces had it reduced to one. – samuraiseoul Aug 08 '13 at 22:58
-
1