Skip to content

Instantly share code, notes, and snippets.

@jonniedarko
Last active January 14, 2016 17:25
Show Gist options
  • Save jonniedarko/eb90d7aa4a35e93af127 to your computer and use it in GitHub Desktop.
Save jonniedarko/eb90d7aa4a35e93af127 to your computer and use it in GitHub Desktop.
Symbol in HTML Input
<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>&dollar;</span>
<input type="text">
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment