Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Help with IE conditional comments!!?
Old 09-28-2009, 04:12 PM Help with IE conditional comments!!?
Junior Talker

Posts: 1
Trades: 0
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...
jamerson is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-28-2009, 05:29 PM Re: Help with IE conditional comments!!?
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Your first CC is too broad, "IF IE" will be read by ALL versions of IE and go to Yahoo.

If you want to target versions ABOVE IE, then you'll have to use the [if gt IE 6] method.

Why are you sending IE6 and below to another web site anyway ?
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with IE conditional comments!!?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10305 seconds with 12 queries