View Full Version : textbox sizing problems with firefox browser
Rookie
03-19-2006, 04:29 AM
Does anyone know why the standard 'width='300px' won't work in a <asp:textbox></asp:textbox> tag?
What is the correct way to change the size of a textbox to display properly in firefox?
Thanks in Advnace!
Rookie
03-21-2006, 01:40 AM
<asp:TextBox ID="txtMiddleName" CssClass="textbox" TabIndex="7" runat="server" Width="25px" MaxLength="2" value = "M" onfocus="if(this.value=='M')this.value=''; doHighlightsmall(this,'on')" onBlur="doHighlightsmall(this,'off');"></asp:TextBox>
The class "textbox" does not contain any height or width constraints
Rookie
03-21-2006, 01:45 AM
Sorry I left off the url http://www.undersound2.com/dev_createaccount.aspx.
I sovled this isssue temporarily by including the width in the css class. This means I have to create a bounce of classes for each size text box which is kind of a pain. If you can help that would be great.
Thanks, Joel
Rookie
03-21-2006, 02:49 AM
Thank you Joel, I feel like you guys know everything!
joelnet
03-21-2006, 10:40 AM
Ahh. I think this was a bug in asp.net 1.x. This works properly in asp.net 2.0. If you view source in IE and firefox, you'll notice the style="width:123px;" is being left out when the server renders the page for fire fox.
If you can, switch to asp.net 2.0 or manually add the width style in...
<asp:textbox runat="server" id="mybox" style="width:123px;" />
Joel Thoms
DiscountASP.NET
http://www.DiscountASP.NET
joelnet
03-21-2006, 12:33 PM
It does on my projects. Please provide the entire code you are using for <asp:textbox /> and a url to an example of your problem.
Joel Thoms
DiscountASP.NET
http://www.DiscountASP.NET
vBulletin® ©Jelsoft Enterprises Ltd.