IE bug: 1px vertical margin around input fields

Affects: IE7, IE8

Description

Input fields wrapped with an inline element will render with an extra 1 pixel margin above and below, regardless of the ‘margin’ property set in the CSS rule.

Workaround

1) Use a conditional comment or similar to serve a margin rule to IE that is 1px less than desired. So for no margin:

form input, form textarea{
    margin:			-1px 0;
}

2) Remove the border from the input - this will also remove the extra margin.