Asked  6 Months ago    Answers:  5   Viewed   25 times

How do I target only Internet Explorer 10 for certain situations like Internet Explorer-specific CSS or Internet Explorer-specific JavaScript code?

I tried this, but it doesn't work:

<!--[if IE 10]>    <html class="no-js ie10" lang="en"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->

Internet Explorer 10 ignores the conditional comments and uses the <html lang="en" class="no-js"> instead of <html class="no-js ie10" lang="en">.



Perhaps you can try some jQuery like this:

if ($.browser.msie && $.browser.version === 10) {

To use this method you must include the jQuery Migrate library because this function was removed from the main jQuery library.

Worked out quite fine for me. But surely no replacement for conditional comments!

Tuesday, June 1, 2021
answered 6 Months ago

The User-agent string for IE 11 is currently this one :

Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv 11.0) like Gecko

Windows 10 example:

Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko

Which means your can simply test, for versions 11.xx,

var isIE11 = /Trident.*rv[ :]*11./.test(navigator.userAgent);

As IE10 user agent was

Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)

it's probably also safe to bet on the fact that now Trident/X is supposed to be the real versionning.

Thursday, June 3, 2021
answered 6 Months ago

Gradient will go out for rounded corners in IE9, so the best solution for now to add one extra div:

 <div class="corners"><div class="gradient"></div></div>

and hide overflow for .corners

.corners {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;

overflow: hidden;

I recomend this Photoshop-like tool for creating cross-browser gradients:

And this one to create border-radius:

Monday, August 2, 2021
answered 4 Months ago

CSS3 filters are not supported in IE10 or Firefox (v.23), and support is unknown for those browsers in the near future.

Have a look:

You could use Modernizr to check for CSS filter support and fallback to a background image if not supported.

Monday, October 4, 2021
answered 2 Months ago

I would use the process method.

  1. You could start any executable and
  2. It has a property which starts your process maximized

    ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe");
    startInfo.WindowStyle = ProcessWindowStyle.Maximized;
    startInfo.Arguments = "";
Thursday, November 11, 2021
Eric D
answered 3 Weeks ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :