I need to customize a text field like the one shown in the image below:
https://i.sstatic.net/gu3JA.png
After making some quick adjustments, I ended up with the following result. My main concern is now the background of the currency symbol.
https://i.sstatic.net/orD7c.png
Here is the modified code snippet (adjusted for online tool compatibility):
.currencySpan {
position: relative;
top: 2px;
left: -160px;
background-color: #ddd;
}
.currencyText {
padding-left: 40px;
display: inline;
height: 40px;
}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div class="form-group">
<div class="icon-addon addon-md" style="vertical-align:top;">
<input type="text" placeholder="0.00" class="form-control currencyText" id="paymentAmount">
<span class="currencySpan">$</span>
</div>
</div>
Does anyone have suggestions on how I can achieve the desired currency background?