How to apply space in span element

Viewed 114928

I have been trying to apply one white space inside the span element, but couldn't able to do it.

In my application i have the following two span elements.

<span style='color:red;margin-right:1.25em'>*</span> 
<span style='color:red;margin-right:1.25em'>&nbsp;</span>

Applied these two spans to different fields to get them in to the same alignment level, but i have the following problem. PFB enter image description here

is there any thing wrong with the above code

the first name field should move a bit right for the proper alignment.

4 Answers

Try add this CSS rule to your span-space element:

white-space: pre;

This solution worked for me,

<span>\u00A0</span>

or

<span>&nbsp;</span>
Related