Styling up my input reduce its height?

hey folks,
i m working on a web app and i needed a border around textfield, so i class them up but classing them up made them short in height. is that a problem? how do i make them as a standard size text field while classing them.
p.s - i noticed a drop down is not what a text field of width:100px in css. how do i make a drop down list equal? it it got to do something with the drop down arrow?

As a rule of thumb, don’t even waste your time trying to resize them perfectly to match.

IE applies a padding you have no control over (roughly 0.3em) and obeys line-height for the height while ignoring the actual HEIGHT parameter, so if you set a width or height it ends up larger than planned. Firefux uses a different default padding (appears to be 2-4px at random) … Opera treats all form input elements as if they were inline-block with no extra paddings apart from what you declare (the only one who’s approach to it that IMHO makes the least bit of sense) don’t even get me STARTED about how badly webkit browsers mangle them… and that’s just INPUTS.

SELECTS are far far worse, given the goofy crap gecko based browsers do with padding, that you can almost NEVER get them the same width as your inputs in any browser, and just changing the system metric (aka dpi) can completely screw anything you declare.

To see this in action, just make a sample page that has a input set to margin:0; padding:0; border:0; background:#888; with the same width and height declared on them and compare them side-by-side in Opera/FF/IE… not even CLOSE to the same.

It’s why my advice on styling form elements for anything more than a general width (which will never be the same cross browser) and colors is DON’T! It’s not worth the headaches.

Oh, and don’t entirely blame the browser makers on this one since the specification doesn’t even say what behavior is the correct one, since it’s entirely up to the user agent (browser) to best determine how to show form elements. It’s an ‘accessibility’ thing… <cosby>RIGHT!!!</cosby>

so what is the best back to border mandatory and input fields ? :frowning: