I need to show text only in IE and not show it for other browsers. Any guidance on this? I looked around and could not find him.
Conditional comments .
eg.
<!--[if IE 6]> Special instructions for IE 6 here <![endif]-->
(There are operators in the condition less than, less than or equal to ... and you can associate branches with different types of behavior for different versions, see here for full details.)
Please note that since IE 10 conditional comments are no longer supported and are treated as regular comments:
http://msdn.microsoft.com/en-us/library/ie/hh801214(v=vs.85).aspx
In order for it to function as before, you need to add a meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">
There, for me, if I need to detect IE (although I try to avoid detecting the browser and detecting the usage function), I use some JS code from here:
Detect IE version (before version 9) in JavaScript
Best.
You have IE conditional comments, or you can do it through javascript detection browser agents or with javascript frameworks like jQuery
if (jQuery.browser.msie) { // do something IE specific }
Maybe in JS:
<script type="text/javascript"> function detectBrowser(){ var browser=navigator.appName; if (browser=="Microsoft Internet Explorer"){ document.write("IE sux"); } } </script>
The examples here assume you know javascript. It would be nice to see everything you need if you only know HTML.
gobbledegook
You need to determine if the current browser is IE and show content only in this case.
The smallest script to detect IE:
if(-[1,]) { alert("Not IE!"); }