PDA

View Full Version : CSS Help




sbryan
Aug 6, 2009, 02:51 PM
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?



Not Available
Aug 6, 2009, 02:56 PM
Use <textarea> instead of <input>. Then it will do.

angelwatt
Aug 6, 2009, 04:05 PM
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.