Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I need separated underscores

Tags:

css

fonts

I would like to display a number of underscores to the user to let them know how many characters they need to fill in to satisfy the length requirement.

My problem is: underscores aren't separated by spaces.

Q: What font or css style should I use so that my underscores can be easily counted?

like image 658
Phillip Senn Avatar asked Dec 03 '11 21:12

Phillip Senn


2 Answers

You can just use letter-spacing: 0.4em; to separate out the various characters in the element. I'm assuming you're using an input element, so:

input {
    letter-spacing: 0.4em; /* or whatever measurement you prefer... */
}

JS Fiddle demo.

References:

  • letter-spacing at the MDC.
like image 135
David Thomas Avatar answered Nov 03 '22 01:11

David Thomas


Use the CSS property letter-spacing.

Visual example: http://jsfiddle.net/8w9WY/

like image 34
wsanville Avatar answered Nov 03 '22 03:11

wsanville