I have button control buttons with CSS line height: 18 pixels. Some of them are type = "button" input controls, while others are bindings styled to be displayed as buttons, such as input controls. In FF3.6.12 / IE8 they are displayed the same height, but in IE7 the anchors are shorter in height. How can I display them correctly in IE7?
I took your demo: http://jsfiddle.net/DnGvF/
and added exactly this CSS at the end: http://jsfiddle.net/gRF9g/
/* ie7 fixes */ .Footer input[type=button], .Footer input[type=submit] { overflow: visible; *height: 24px; *line-height: 15px }
Some explanation of what is going on there:
overflow: visible
height
line-height
IE7 .
, kludgy, CSS .
, IE7 - , :
*+html .button { line-height:24px }
- Modernizr, :
.ie7 .button { line-height:24px }
, - , IE7 , , CSS , - .
EDIT: IE7:
<!--[if IE7]><style type="text/css">.button{line-height:24px}</style><![endif]-->
Buttons in IE have an extra padding / borders / whatever - they don't style well, as in other browsers.