In the site I am currently building I am having trouble getting my border colors right for <input>
and <button>
elements. I would like to have the top, left, and right borders to be the same color and then have the bottom border a different color. I can get the styling to work for any other element to work except for those two, and this issue only exist in IE9. Any help or explanation would be greatly appreciated.
Example of my problem: http://jsfiddle.net/NyG3x/24/
Try setting to borders separately.
This appears a bug in IE9. If you set the bottom border to 1px, the red border appears to show correctly. However, if you set the value to anything more than 1px, it seems to revert the
border-color
to the value of the otherborder-color
.UPDATE
A simple solution would be to remove the styling from the
button
, wrap the inner text of thebutton
inside adiv
and style thediv
. This works in IE9 as shown here.I know this is more markup, but it will surely solve the issue.
Apply the 1px border as usual to the three sides, but wrap your form elements in a tag, say a div tag and apply a 5px bottom border on the div tag.
HTML would look something like this:
And CSS would look like this: