Monday, February 21, 2011

line height and font size

Hi,

What sets the height of the textbox, line height or font size?

From stackoverflow
  • None

    its

    height
    

    attribute

    <input type="text" class="hei" id="txt1" />
    <style>
    .hei
    {
       height: 40px;
    }
    </style>
    

    font-size: Sets or retrieves a value that indicates the font size used for text in the object.

    line-height: Sets or retrieves the distance between lines in the object

  • input {
        height: 100px;
    }
    
  • the css option height?

  • If it's <input type="text" /> then it's a combination of font-size, line-height and any explicitly declared height attributes.

    For <textarea> it's an explicit height declaration, though I think it's expressed as rows rather than height.

    enkrs :