Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sk3pt1c

macrumors 6502a
Original poster
Nov 29, 2005
918
6
a simulacrum
hi there, i've made a site that looks like crap on IE7 (of course),
so i'd like to detect ie7 and redirect to a page that tells users to
upgrade their browsers.
i know i can provide an alternate stylesheet for ie7 users, but for
this specific site, i'd like to just redirect to a page i've made with that
notification on it.
thanks :D

also, for some reason, this:

Code:
<!--[if lte IE 7]<link rel="stylesheet" href="ie7.css"/>[endif]-->

doesn't seem to work...
 
right, tried various different methods, but the only one that worked is this:

Code:
<script language="JavaScript"><!--
if (navigator.userAgent.toLowerCase().indexOf('7.0') != -1) {
document.write("<link rel='stylesheet' href='ie7.css' type='text/css'>");
}

// --></script>
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.