all groups > inetserver asp components > december 2004 >
You're in the

inetserver asp components

group:

ASP:TextBox Width doesn't work with Firefox 1.0


ASP:TextBox Width doesn't work with Firefox 1.0 AJStadlin
12/5/2004 5:23:01 PM
inetserver asp components:
I created a Web Form in VS2003 with some ASP:TextBox components on it. In
Windows with IE6, everything looks great. However, when I tested the form in
Firefox 1.0 (in a clean install of Fedora Core 3 with all updates) the WIDTH
property of the ASP:TextBox doesn't work. No matter what size or units I
use, the TextBox component always appears to be about 1 inch long for single
line and 1 x 1/2 inch for multi-line.

Does anyone else have this problem?

The test page that demonstrates the problem is:
http://www.regedit64.net/dnsbl/TextBoxTest.aspx.

Any fix, or work around would be greatly appreciated.

Thanks

--
RE: ASP:TextBox Width doesn't work with Firefox 1.0 AJStadlin
12/5/2004 5:57:03 PM
After some research, it looks like "Columns" is the property I need to use
for Firefox. I would be curious if anyone has this issue with the Windows
version of Firefox.

AJStadlin

[quoted text, click to view]
Re: ASP:TextBox Width doesn't work with Firefox 1.0 Gottfried Mayer
12/6/2004 9:58:15 AM
[quoted text, click to view]

Hi AJStadlin,

In the Windows Version of Firefox 1.0 it's still the same:
The first TextBox is bigger (columns=100)
The sixth TextBox is bigger (HTML <INPUT> Control, Width = 600px)

After comparing the sources, I got the following interesting result:
In the Firefox-Source, all the [style="width:some-value"] tags that
control the size in IE seem to be missing:

[BEGIN Source:TextBoxTest.aspx IE6]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>TextBoxTest</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form name="Form1" method="post" action="TextBoxTest.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="SNIP" />

<p>
<input name="Textbox6" type="text" value="Width=600 Columns=100"
size="100" id="Textbox6" style="width:600px;" /></p>
<P>
<input name="TextBox1" type="text" value="Default Text Box Width"
id="TextBox1" /></P>
<P>
<input name="TextBox2" type="text" value="Width=&quot;100%&quot;"
id="TextBox2" style="width:100%;" /></P>
<P>
<input name="TextBox3" type="text" value="Width=&quot;600px&quot;"
id="TextBox3" style="width:600px;" /></P>
<P>
<input name="TextBox4" type="text" value="Width=&quot;40em&quot;"
id="TextBox4" style="width:40em;" /></P>
<P><INPUT style="WIDTH: 600px; HEIGHT: 22px" type="text" size="93"
value="HTML <INPUT> Control, Width = 600px"></P>
<P>
<textarea name="TextBox5" id="TextBox5"
style="height:400px;width:600px;">Width=&quot;600&quot;
Height=&quot;400&quot;</textarea></P>
</form>
</body>
</HTML>
[END Source:TextBoxTest.aspx IE6]

[BEGIN Source: TextBoxTest.aspx FF1]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>TextBoxTest</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>

<body>
<form name="Form1" method="post" action="TextBoxTest.aspx" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="SNIP" />

<p>
<input name="Textbox6" type="text" value="Width=600 Columns=100"
size="100" id="Textbox6" /></p>
<P>
<input name="TextBox1" type="text" value="Default Text Box Width"
id="TextBox1" /></P>
<P>
<input name="TextBox2" type="text" value="Width=&quot;100%&quot;"
id="TextBox2" /></P>

<P>
<input name="TextBox3" type="text" value="Width=&quot;600px&quot;"
id="TextBox3" /></P>
<P>
<input name="TextBox4" type="text" value="Width=&quot;40em&quot;"
id="TextBox4" /></P>
<P><INPUT style="WIDTH: 600px; HEIGHT: 22px" type="text" size="93"
value="HTML <INPUT> Control, Width = 600px"></P>
<P>
<textarea name="TextBox5" id="TextBox5">Width=&quot;600&quot;
Height=&quot;400&quot;</textarea></P>

</form>
</body>
</HTML>
[END Source:TextBoxTest.aspx FF1]


Seems to me as if FireFox is not recognized correctly with the .NET
Framework :-(

Re: ASP:TextBox Width doesn't work with Firefox 1.0 knectar NO[at]SPAM gmail.com
12/14/2004 7:29:09 PM
thank you for this tip. So simple, but I'd been banging my head on it
for too long with textboxes that weren't rendering well in firefox,
netscape or safari. this simple solution seems to be stable. Part of
the problem seems to be that visual studio will drop these inline style
tags. Meanwhile, it occasionally adds unwanted tags. Does anyone know
of any setting in the vs.net options that would give some control over
these style defaults? thanks, chris

http://www.flynote.com


[quoted text, click to view]
AddThis Social Bookmark Button