user1010892
user1010892

Reputation: 1189

inline CSS hack for ie6, ie7 and ie8

Does anyone know of a way to hide a single line of CSS to ie6,7 and 8 exclusively so that they simply don't see that line?

I'd like to be able to hide the a media query start and end so that those browsers just see what's inside the query.

I don't want to use conditional comments. It must be inline.

I know that sounds strange but I have my reasons! - If I have a mobile first cascade approach to my media queries but can show what's inside those queries to these browser then all modern browsers can be responsive but older browsers just get the final media query which in this case would be the desktop version.

thanks in advance!

Upvotes: 1

Views: 1013

Answers (1)

Fabrizio Calderan
Fabrizio Calderan

Reputation: 123397

it's not “inline” but it doesn't use conditional comments... try simply with

@media all and (min-width:0) {
   /* your rules here */
}

you will target any modern browser and IE9

Upvotes: 4

Related Questions