A good[ish] website

Web development blog, loads of UI and JavaScript topics

If not IE, conditional HTML comment

Filed under: HTML/CSS— Tagged with: conditional, IE, snippets

There’s a conditional command to check if a browser is not IE.

You can use magic HTML comment to do that:

<!--[if !(IE)]><!-->
<div class="foo">Content that is not shown to IE users.</div>

Comments would go here, but the commenting system isn’t ready yet, sorry. Tweet me @hiljaa if you want to make a correction etc.

  • © 2021 Antti Hiljá
  • About
  • Follow me in Twatter → @hiljaa
  • All rights reserved yadda yadda.
  • I can put just about anything here, no one reads the footer anyways.
  • I love u!