CSS for form labels and input boxes

G

Guest

I have stopped using tables and now use CSS for all layouts on the web. I am
havibg trouble though getting my asp.net labels and textboxes lined up
correctly. I want the page to work in both firefox and IE.

I have the following

<asp:Label ID="Label1" runat="server" Text="Part Number :"
CssClass="label"></asp:Label>
<asp:TextBox ID="txtPartNumber" runat="server"></asp:TextBox><br />
<asp:Label ID="Label2" runat="server" Text="Qty : "
CssClass="label"></asp:Label>
<asp:TextBox ID="txtQty" runat="server"
Width="32px"></asp:TextBox><br />

The label uses a class in my style sheet called .label with following setting

..label
{
font-family: Verdana, Helvetica, sans-serif;
font-size: 11px;
font-weight: normal;
line-height: 12px;
color:Gray;
width:100px;
text-align:right;
}


When I run the page the Qty label gets cropped smaller than 100px ? I have
tried to use dispay attribute in css of inline-block , which helps ie but not
ff,.
what is the best way for laying out ?

Thanks

Neil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top