Is there a way to put a permanent space into an input field?
Hello ladies and gentlemen,
I have an input field and when the user clicks into it, I would like the
type cursor line to appear one space into the input box. Is there a way to
force a space at the start of an input field with css and/or html? I know
this is possible with javascript but if there is one, I would like to use
a css/html-only way.
I have tried inserting a space using the "content" attribute but that
didn't work. Or maybe I am not doing it correctly. Here's the code:
HTML
<input class="input-test" type="text" value="" placeholder="test">
CSS
.input-test:before{
content: " ";
}
No comments:
Post a Comment