Jump to content

IF IE6 Else


liamloveslearning

Recommended Posts

Hi all,

 

im having a tedious time sorting my website in ie6!, I want to show 1 navigation if ie6 if not show the other, Is there a specific hack for this? Ive tried googling and found nothing and ive used the following which doesnt seem to work...

 

<!--[if IE 6]>
my code to show if ies [ELSE]show this if its anything other than ie6 <![endif]--> 

Link to comment
Share on other sites

Conditional comments don't work with if/else I don't believe. You only get if.

 

You will have to rethink your logic on this. You could use your conditional comment to wrap everything in an extra div with an ID you can target in IE6 (and only IE6). That's one suggestion.

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 weeks later...

Hi all,

 

im having a tedious time sorting my website in ie6!, I want to show 1 navigation if ie6 if not show the other, Is there a specific hack for this? Ive tried googling and found nothing and ive used the following which doesnt seem to work...

 

<!--[if IE 6]>
my code to show if ies [ELSE]show this if its anything other than ie6 <![endif]--> 

 

There was one, then there was another one, and a third. Now they are talking about IE9.. And you are still wasting time with IE6?

 

You would think useless junk should be avoided, even more so, when it comes to useless junk, about a decade old.

 

Maybe its time for me to reinstate my warning, about old browsers in my signature.. Huh? nah!

Link to comment
Share on other sites

  • 2 weeks later...

or this should work if you really want to use conditional statements

 

<!--[if lte IE 6]>
my code to show if ie6 or less
<![endif]-->
<!--[if gt IE 6]>
show this if its ie higher than ie6 
<![endif]-->

<!--[if !IE]>

show this if its anything other than ie

<![endif]-->[/code]

 

 

 

see:

http://css-tricks.com/how-to-create-an-ie-only-stylesheet/

i know it's about style sheets but it has a lot of info on IE conditional statements

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.