I am having an issue with the validation text appearing behind my textbox instead of below it. Despite setting the display to block in the CSS class for the assignment type and start date, the validation text is not displaying properly. I have tried various solutions but haven't been able to fix it yet.
Below is a snippet of my current code:
<div class="floatLeftPaddTop15PaddLeft40">
<asp:Label id="costCodesLabel2" runat="server" >Cost code 2:</asp:Label><br />
<asp:TextBox id="costCodeTextBox2Prefix" runat="server" CssClass="textBoxPrefix" Visible="false" ></asp:TextBox>
<div class="costCodeDiv" >
<asp:TextBox id="costCodeTextBox2" runat="server" CssClass="textBoxSuffix" ></asp:TextBox>
<asp:RequiredFieldValidator ID="costCodeValidator2" runat="server" ControlToValidate="costCodeTextBox2" ErrorMessage="Cost code is required."
ForeColor="Red" Display="Dynamic" Enabled="false" />
</div>
</div>
and here's a segment of my CSS:
.textBoxSuffix {
width: 120px;
height: 22px;
border: 1px solid #999;
}.
.textBoxPrefix {
width: 35px;
height: 22px;
border: 1px solid #999;
}