I am trying to set height for a form field. <div style="height:20px;padding:0px;"> <form id="searchbox_0003.......... /> <input type="hidd........." /> <input type="imag........." /> </form> </div> Code (markup): the 20px works in firefox but not in ie7 any idea why or is my code wrong ?
If you don't set overflow to hidden, IE will treat height as if it was min-height. The reason it's growing (I assume) is that the height of your content is taller than that 20px. Honestly, I'd never set a height that way around a form element - their sizes are too unpredictable cross browser to try and fix the height unless you do it ON the elements themselves.
Thanks man... <div style="height:20px;overflow:hidden;"> has taking care of the problem.. What you mean is that, rather then div style around form element , style the form ?