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

Discussion in 'ASP .Net' started by craigkenisston@hotmail.com, Jul 27, 2005.

  1. Guest

    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.
    , Jul 27, 2005
    #1
    1. Advertising

  2. Ben Amada Guest

    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
    Ben Amada, Jul 27, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    343
  2. AndrewF
    Replies:
    1
    Views:
    738
    Bruce Barker
    Oct 10, 2005
  3. Replies:
    11
    Views:
    1,073
    Toby Inkster
    Jan 28, 2005
  4. markus
    Replies:
    8
    Views:
    284
    Severian
    Jun 29, 2004
  5. Jeff
    Replies:
    1
    Views:
    397
    Nathan Sokalski
    Oct 8, 2008
Loading...

Share This Page