How to detact IE7?

for javascript:

var isIE7 = /*@cc_on!@*/false && ( parseInt( navigator.userAgent.toLowerCase().match( /msie (\d+)/ )[1] ) >= 7 );

for styesheet:

<!–[if IE 7]>
<link rel=”stylesheet” href=”/css/ie7.css” type=”text/css”>
<![endif]–>

Leave a Comment