M
Microsoft
Hello, i am struggling with the Layout of a simple login page with the
normal look like this and i hope someone can help me please
User name - TextBox
Password - TextBox
I did have it looking good when i used a <ul> and <li> for the label and
textbox for each control.
Then i had to add Accessibility and added the AssociatedControlID and now
the controls do not line up with each other and it looks rubbish.
I wonder if anyone has found a solution for this and could they please share
it with me.
Many thanks
John
Here is the code from the aspx page
<ul>
<li>
<asp:Label ID="lblUserName" AssociatedControlID="UserName" runat="server"
meta:resourcekey="lblUserNameResource1"></asp:Label>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="UserName" ErrorMessage="Email Address is required."
ToolTip="Email Address is required." ValidationGroup="Login1" Width="9px"
meta:resourcekey="UserNameRequiredResource1">*</asp:RequiredFieldValidator>
<asp:TextBox ID="UserName" runat="server" Width="200px"
meta:resourcekey="UserNameResource2"></asp:TextBox>
</li>
<li>
<asp:label id="lblPassword" AssociatedControlID="Password" runat="server"
meta:resourcekey="lblPasswordResource1"></asp:label>
<asp:requiredfieldvalidator id="PasswordRequired" runat="server"
controltovalidate="Password" errormessage="Password is required."
tooltip="Password is required." validationgroup="Login1" width="9px"
meta:resourcekey="PasswordRequiredResource1">*</asp:requiredfieldvalidator>
<asp:textbox id="Password" runat="server" textmode="Password" width="200px"
meta:resourcekey="PasswordResource2"></asp:textbox>
</li>
</ul>
normal look like this and i hope someone can help me please
User name - TextBox
Password - TextBox
I did have it looking good when i used a <ul> and <li> for the label and
textbox for each control.
Then i had to add Accessibility and added the AssociatedControlID and now
the controls do not line up with each other and it looks rubbish.
I wonder if anyone has found a solution for this and could they please share
it with me.
Many thanks
John
Here is the code from the aspx page
<ul>
<li>
<asp:Label ID="lblUserName" AssociatedControlID="UserName" runat="server"
meta:resourcekey="lblUserNameResource1"></asp:Label>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server"
ControlToValidate="UserName" ErrorMessage="Email Address is required."
ToolTip="Email Address is required." ValidationGroup="Login1" Width="9px"
meta:resourcekey="UserNameRequiredResource1">*</asp:RequiredFieldValidator>
<asp:TextBox ID="UserName" runat="server" Width="200px"
meta:resourcekey="UserNameResource2"></asp:TextBox>
</li>
<li>
<asp:label id="lblPassword" AssociatedControlID="Password" runat="server"
meta:resourcekey="lblPasswordResource1"></asp:label>
<asp:requiredfieldvalidator id="PasswordRequired" runat="server"
controltovalidate="Password" errormessage="Password is required."
tooltip="Password is required." validationgroup="Login1" width="9px"
meta:resourcekey="PasswordRequiredResource1">*</asp:requiredfieldvalidator>
<asp:textbox id="Password" runat="server" textmode="Password" width="200px"
meta:resourcekey="PasswordResource2"></asp:textbox>
</li>
</ul>