|
I'm (a non-professional) designing a website and I want to direct all users to website X, except send all users of IE 6 and below to website Y.
I am using conditional comments for IE and it is only working partially.
Here is the problem:
I can direct a web browser when I only have 1 solo cond. comment:
<!--[if lte IE6]> <meta-equiv=refresh" content="0; url=websiteY.com" /"> <![end if]-->
But when I try to send anything greater than or equal to IE 6 somewhere, only the first conditional comment gets read.
It has something to do, I think, with the stacking of the two comments without indenting any of them. They are currently just two standalone commands and IE (whichever version) only responds to the first, regardless of what order they're in. Again, they aren't indented or nested, etc.
Here is my current script that's not working (I substitued yahoo and google for the website names):
<!--[if IE]>
<meta http-equiv="refresh" content="0; url=http://www.yahoo.com" /">
<![end if]-->
<!--[if lte IE 6]>
<meta http-equiv="refresh" content="0; url=http://www.google.com" /">
<![end if]-->
What happens is that every version of IE reads only the first comment (in this example, redirects to yahoo.com) and moves on. IE 6 & lower pay no attention to the second comment (and doesn't go to google, but yahoo.com like all the rest)??
Note: When I tried to simply type in instructions for IE 6 & below - <!--[if lte IE 6]> - that worked to redirect IE 6 and lower, but for some reason I couldn't access it with IE 8 (and never tried IE 7).
Please help - I'm lost...
|