Setting a height to a parent element can't squish down it's children (parent would be td and the child would be the input in this case). So, what it does is depends on what the overflow property is set to.
If the overflow property is set to hidden, then it will chop off the extra that goes beyond the space td gives. If overflow is set to visible (which it is by default), then the parent will grow to fit all of it's children inside of it.
So, what is likely happening is that the td is actually growing beyond 40px, even though you explicitly set it to that.
If I understand what you mean by "large padding underneath", do you mean that under the input there is a big white space between it and the edge of the td. If that's the case, you could set the padding on the td to 0 (or 5px, or whatever you want it to be). If you explicitly state it, it will be exactly the same in all browsers.
Also, the input may also have a margin outside of it, so you may want to set it's margin to 0px.
I don't really like to plug myself on SitePoint, but I think these two tutorials I wrote will help clear it up further if you need:
[CSS Lesson 2.2: Dimensions: The Properties and [url=http://www.htmlblox.com/lessons/css-lessons/lesson-24-dimensions-adding-it-all-up/]Lesson 2.4 - Dimensions: Adding It All Up](http://www.htmlblox.com/lessons/css-lessons/lesson-22-dimensions-the-properties/)
I hope that helps clear it up a bit. Let us know if you have any more questions.