While the title may lead you to believe this is just another CSS issue, it's actually a bit different. I have a textbox with a placeholder property and a applied CSS class. Now, I need to add a label to signify it as a mandatory field. The problem arises because of the CSS - I can't seem to position the label in the top right corner of the textbox.
Here's the code snippet:
<div id="formwrap">
<div class="formarea">
<p class="sub_headline">
User Details</p>
<asp:TextBox ID="txtFname" class="input" placeholder="First name" runat="server"></asp:TextBox>
<asp:Label runat="server" Text="*" ForeColor="Red"></asp:Label><br />
<asp:RequiredFieldValidator runat="server" ErrorMessage="Please Enter First name" ControlToValidate="txtFname" ></asp:RequiredFieldValidator>
</div>
</div>
CSS snippet:
.input
{
font-family: 'Lato' , sans-serif;
border: 1px solid #CCCCCC;
width: 65%;
height: 20px;
margin: 14px 94px 0 0;
font-size: 16px;
font-weight: lighter;
padding: 4px;
color: #E96151;
float: left;
}
Any thoughts on how I can resolve this?
Appreciate your help!