Ad Space
Cloud Computing and Cloud Hosting by Rackspace
Ad Space
Cloud Computing and Cloud Hosting by Rackspace

Hosting Geared For
your CMSMS needs

CMSMS ready Hosting

Hosting Starting at $15

  • • Hosted Mail
  • • Personal Control Panel
  • • CMSMS 1.8.1 tested
  • • Lightly packed servers
  • • Intrusion Detection
  • • URL monitored
  • • Custom solutions available

Order your hosting Now

CP Blogs

valid target of none IE - Conditional Comments

Posted by: Jeremy Bass
on Aug 25, 2009

Category:

Coding, Intermediate, Presentation, Browsers - Compatibilities and Inconsistencies, HTML

Summary: Speaking of Conditional Comments and needing a valid none IE target....

Ad Space

So If you have read up on Conditional Comments or read this article you will see that what they suggest.

This says


<![if !IE]><p>You are not using Internet Explorer.</p><![endif]>

demo:

You are not using Internet Explorer.

If you see a red box the you were targeted and it worked... And well yes it should to since MSDN said it would. But sadly you will see that it doesn't validate.

Valid XHTML 1.0 Transitional

shows:
  • Error Line 482, Column 4: "if" is not a reserved name
    <![if !IE]> <div style="background-color:#900;">You are not using Internet Explo

     

  • Error Line 482, Column 95: "endif" is not a reserved name
    …t using Internet Explorer.</div> <![endif]>

     

But this validates....


<!--[if gte IE 9]><!--> a valid target of none IE <!--<![endif]-->

demo:

a valid target of none IE

If you see a red box the you were targeted and it worked...

Ad Space

Get Social With It

[+]

Add A Comment

[+]

Code in the picture:
Title:
Your Name(*):
Email:
Notify me of any further comments to this thread:
Website:
Comment(*):
 
Previous page: Hosting FAQ Next page: Experimental