Last active
January 14, 2016 17:25
-
-
Save jonniedarko/eb90d7aa4a35e93af127 to your computer and use it in GitHub Desktop.
Symbol in HTML Input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.input-symbol{ | |
position:relative; | |
} | |
.input-symbol span{ | |
position: absolute; | |
transform: translate(0,-50%); | |
top:50%; | |
pointer-events:none; | |
margin-left:0.5em; | |
} | |
.input-symbol input{ | |
text-indent:1em; | |
} | |
</style> | |
<div class="input-symbol"> | |
<span>$</span> | |
<input type="text"> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment