By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,336 Members | 1,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,336 IT Pros & Developers. It's quick & easy.

What's the usual way to setup input textbox width (and be cross-browser) ?

P: n/a
I'm creating a form with asp.net.
I have my inputs like this :

<label for="USER_COMPANY">Company Name:</label>
<asp:textbox id="USER_COMPANY" runat="server" cssclass="inputBox"
style="width:250px"></asp:textbox><br >

This worked great until I used the designer and it took ride of the
"style=width:250px" and changed them without my approval for
"width:250px".

The worst thing. The "width:250px" is correctly rendered to IE as
"style=width:250px", very expectable and nice. But for Firefox and
Opera it does not !. Actually, it does not return nothing about the
input textbox width to those browsers.

What's the solution for this ? Every time I touch the designer, it
drops my "correct" markup.

Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
cr************@hotmail.com wrote:
<label for="USER_COMPANY">Company Name:</label>
<asp:textbox id="USER_COMPANY" runat="server" cssclass="inputBox"
style="width:250px"></asp:textbox><br >


It should work if you define the width in your CSS file under "inputBox".
You can then drop the style="width:250px" out of your aspx file.

Ben
Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.