When I look at this code snippet, I noticed that the width percentage attribute of the td tag is being ignored in Firefox and IE. As a result, both "Password" and the text box are taking up half of the row, which feels like a waste of space. Can you spot anything blatantly wrong with the following snippet:
<table align="center" width="80%" cellpadding="0" cellspacing="0" class="loginBg">
<asp:Panel runat="server" ID="pnlLoginIn" style="width:100%;">
<tr>
<td style="padding-left:0px;font-family:Verdana;font-size:70%;width:30%">Username</td>
<td style="padding-right:0px;width:70%" align="left"><asp:TextBox id="txtUsername" runat="server" Width="90px" /></td>
<asp:RequiredFieldValidator ID="rfvUserName" runat="server" ErrorMessage="*" ControlToValidate="txtUsername" ValidationGroup="credentials" Display="Dynamic" />
</tr>
</asp:Panel>
</table>
I am applying styles inline because this page is quite basic and is mainly used to fill an iframe within another web application.
Any advice or tips would be greatly appreciated.
UPDATE: Added extra code for context clarification.
UPDATE 2: After removing the asp:Panel, it seems that the width proportioning works correctly but only when the browser window or iframe is over 300 pixels wide. In smaller windows, it inexplicably sets both elements to be 50% width. Quite strange!