Question

Ok, this is driving me insane.

I have a form and I'm not using tables. Each row is a p tag and consists of a label and a control. When I add a validation summary at the bottom it goes wonky.

How do I get the validation summary to line up properly?

.Label
{
    float: left;
    width: 12em;
    text-align: right;
    padding-right: 1em;
}

.TextBox
{
    display: inline-block;
    width: 244px;
}

<p>
    <asp:Label runat="server" ID="uxNotesLabel" CssClass="Label">Notes</>
    <asp:TextBox runat="server" ID="uxNotesTextBox" CssClass="TextBox" TextMode="MultiLine" Rows="5"></asp:TextBox>
</p>

<p>
    <asp:Label runat="server" ID="uxSpaceLabel3" CssClass="Label"></asp:Label>
    <asp:ValidationSummary runat="server" ID="uxMaterialNeedValidationSummary" ValidationGroup="AddMaterialNeed" ForeColor="Red" />
</p>

That gives me this:

PatienceTester

Was it helpful?

Solution

not too clear:

Would you need CSS like:

#uxMaterialNeedValidationSummary {text-align:center;}

or

#uxMaterialNeedValidationSummary {padding-left:12em;}

Whatever id or class is avalaible

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top