Reputation: 55
I want to do it as well as in this example in HTML and put the character at the end of the input field. How to do it? Thank you.
Upvotes: 2
Views: 1069
Reputation: 1470
Here, a working example using position relative:
.required{
position:relative;
right:15px;
top: 3px;
color:red;
}
<input type="text" placeholder="John Doe" name="full_name"><span class="required">*</span>
Upvotes: 6
Reputation: 5703
This would be better and easy
.star {
display: block;
color: red;
margin: -20px 185px;
}
<input style="width:200px">
<span class="star">*</span>
Upvotes: 2