Aalhussein

Aalhussein

  • NA
  • 133
  • 10.2k

asp.net input form format with CSS

Jan 19 2020 1:42 PM
Hi,
 
I used to create input webapplication with input form using table to allign labels with asp.net server controls . in my last project, I used css to make the allignment. The code is below:
 
<asp:Label ID="lblemployeeAr" runat="server" Text="Employee Ar" CssClass="myCaptionForm"></asp:Label>
<asp:TextBox ID="txtEmployeeAr" runat="server" CssClass="myInputForm"></asp:TextBox> <br />
<asp:Label ID="lblEmployeeEn" runat="server" Text="Employee En" CssClass="myCaptionForm"></asp:Label>
<asp:TextBox ID="txtEmployeeEn" runat="server" CssClass="myInputForm"></asp:TextBox> <br />
 
The CSS file is below :
 
.myInputForm {
display: block;
float: left;
}
.myCaptionForm {
display: block;
width: 10em;
text-align: right;
padding-right: 1em;
float: left;
}
 
it works fine in my local PC ( development ) but when I deployed it to hosting provider. it works with some computers and does not work in others. Not sure why this is happening. What am I missing . Please advise
http://kfmc.wdbcs.com/internship/internEnroll.aspx
You can test the form above. I test it in IE , Chrome and Edge. again, it worked in some PC ,but other PC doesnot work.

Answers (2)