textbox height different than input height

Discussion in 'ASP .Net' started by tshad, Mar 8, 2007.

  1. tshad

    tshad Guest

    I have 2 objects - one an aspx textbox object and one an html Input object:

    <asp:TextBox ID="UserName" CssClass="top-links" style="height:10px"
    Columns="12" runat="server"/>

    <input name="textfield222" type="text" class="top-links" size="12"
    height="10px" />

    The heights are different, however. Why would that be?

    The TextBox height appears about 2/3 the size of the Input object even
    though both have ha height of 10px.

    Why does the style work differently?

    Thanks,

    Tom
     
    tshad, Mar 8, 2007
    #1
    1. Advertising

  2. tshad

    bruce barker Guest

    <input> does not have a height property, so its ignored. you need to use
    a style command:

    <input name="textfield222" type="text" class="top-links" size="12"
    style="height:10px;" />


    -- bruce (sqlwork.com)


    tshad wrote:
    > I have 2 objects - one an aspx textbox object and one an html Input object:
    >
    > <asp:TextBox ID="UserName" CssClass="top-links" style="height:10px"
    > Columns="12" runat="server"/>
    >
    > <input name="textfield222" type="text" class="top-links" size="12"
    > height="10px" />
    >
    > The heights are different, however. Why would that be?
    >
    > The TextBox height appears about 2/3 the size of the Input object even
    > though both have ha height of 10px.
    >
    > Why does the style work differently?
    >
    > Thanks,
    >
    > Tom
    >
    >
     
    bruce barker, Mar 8, 2007
    #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:
    559
  2. Wotney
    Replies:
    1
    Views:
    533
    Flinky Wisty Pomm
    Oct 25, 2006
  3. Replies:
    3
    Views:
    750
    George Ter-Saakov
    Feb 23, 2007
  4. JC

    textbox height = containing cell height - x

    JC, Jul 29, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    183
    DujHoD
    Aug 2, 2004
  5. Susan Cranford
    Replies:
    2
    Views:
    403
Loading...

Share This Page