CSS Help

Discussion in 'Web Design and Development' started by sbryan, Aug 6, 2009.

  1. sbryan macrumors member

    Joined:
    Jun 6, 2007
    #1
    I'm trying to define the height of a single-line text input box in a form.

    It absolutely must be 20px in height. Anything more and it sticks out like a sore thumb. I've never been constrained to this before.

    Whenever I try to style it using a containing div, class, or selector, the size change doesn't take.

    Is there a minimum height for text boxes? If so, how do I hack around that?
     
  2. Joined:
    Jun 30, 2009
    #2
    Use <textarea> instead of <input>. Then it will do.
     
  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    Code:
    input[type=text] {
     height: 20px;
    }
    Or give the input tags in question a class of something like "text" and use that for the CSS selector. You may also need to watch the padding. If you have an example page (or code) for us to look at that may help too.
     

Share This Page