How To Display Content Only For Certain Browsers

Top Tip: Click here to run a free scan for common PC errors

I had some rogue code on my website that readers told me was causing Internet Explorer 8 to crash.  I didn’t want to remove the offending code completely, so I searched Google for a way to show the code for all other browsers, and different code just for Internet Explorer 8.

The solution was simpler than I thought, e.g. the code for my solution was:

<!--[if IE 6]>

<p>You are using Internet Explorer 6.</p>

<![endif]-->

<![if !IE]>

<p>You are not using Internet Explorer.</p>

<![endif]>

More: Conditional Comment


Read Related Posts




Latest Posts

Filed Under: Blogging

Tags:

About the Author: Want to get more out of your PC, the internet or your mp3 player? Onetipaday.com is here to provide clear simple tips and guides to help you achieve just that. Each tip will be easy to implement and will take no more than 5 minutes to read and implement. What will you learn today?

    blog comments powered by Disqus