You need to add *
before the property name, and that will target only IE7, so you need to write this line-height : 32px;
as *line-height : 32px;
As I realized you wanted hacks for each IE, so here you go
- For IE6 -
_
- For IE7 -
*
- For IE8 -
\0
- For IE9 -
\9
Declare styles for IE10 specifically using CSS Only
@media all and (-ms-high-contrast: none) {
/* This won't go inline but can be used at document level*/
/* Declaration Blocks Goes Here*/
}
You can read here for more information on how to declare IE only styles using @media
queries
Still I would suggest you to use conditional comments which will make your life much easier instead of declaring inline styles.