471,066 Members | 1,567 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

Textbox is tiny on Mozilla Firebird

When I use IE, the textbox on my webform is normal. When I use Mozilla
Firebird, the textbox is tiny and it is impossible to type text into it.

What must I do to make the textbox viewable with Mozilla?


Nov 18 '05 #1
3 1149
VS.NET tries to help by stripping out some attributes for down level
browsers.
As a workaround, try some code like this in your code behind:
MyTextbox.Attributes.Add("style", "width:325px;")

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"Tim Zych" <tz***@nonoemail.xxx> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
When I use IE, the textbox on my webform is normal. When I use Mozilla
Firebird, the textbox is tiny and it is impossible to type text into it.

What must I do to make the textbox viewable with Mozilla?

Nov 18 '05 #2
Unfortunately .Net doesn't consider Mozilla an uplevel browser and thus
doesn't generate the proper style sheet code to size the control.

As Steve suggested you can manually fix that, but that's a nightmare if you
need to do this for all controls.

This is all controlled by the browser settings in machine.config. One way to
do this is to add the browser string(s) for mozilla.

What I do instead is hack my local web.config file and just force it to use
HtmlTextWriter which outputs uplevel browser code all the time.
<system.web>

<browserCaps>
TagWriter=System.Web.UI.HtmlTextWriter

</browserCaps>

</system.web>

Be careful with this because this will essentially disable any browser
specific output! This works fine for my apps, but if you have really old
browsers or other PDA/Phone devices attaching this is probably not what you
want.

OTOH, if you output HTML 4 HTML it rarely does no worse then the HTML 3.2
that .Net kicks out - except that it strips off the style info...
+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/webblog/
----------------------------------
Making waves on the Web
"Tim Zych" <tz***@nonoemail.xxx> wrote in message
news:#k*************@TK2MSFTNGP12.phx.gbl...
When I use IE, the textbox on my webform is normal. When I use Mozilla
Firebird, the textbox is tiny and it is impossible to type text into it.

What must I do to make the textbox viewable with Mozilla?

Nov 18 '05 #3
Hi,
in addition to what others have suggested,
make sure if youre using one of the asp.net server controls, to use the
"style" attribute within that tag.
in other words, instead of doing
<asp:textbox id="whatever" width="10px">
try
<asp:textbox id="whatever" style="width:10px;"> (not sure of correct
syntax, but you get idea).

the first example will work ok in IE but not Netscape/Mozilla.

HTH

"Tim Zych" <tz***@nonoemail.xxx> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
When I use IE, the textbox on my webform is normal. When I use Mozilla
Firebird, the textbox is tiny and it is impossible to type text into it.

What must I do to make the textbox viewable with Mozilla?

Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Freddy | last post: by
3 posts views Thread by Mr. x | last post: by
1 post views Thread by Thomas | last post: by
2 posts views Thread by Robert William Vesterman | last post: by
1 post views Thread by Florian Feldhaus | last post: by
4 posts views Thread by saif | last post: by
4 posts views Thread by Maziar Aflatoun | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.