Steve
Steve

Reputation: 1765

CSS: IE11 not applying style

At this page there is a graphic in the sidebar:

enter image description here

I have in the <head>:

<!--[if IE]>

    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/ie.css" media="screen" />

<![endif]-->

The ie.css file contains .textwidget {display: inline-block;} however this CSS rule is not being applied when I select the <div class="textwidget"> while inspecting the graphic in IE11.

Upvotes: 0

Views: 871

Answers (2)

Mr Lister
Mr Lister

Reputation: 46559

IE11 doesn't support conditional comments such as <!--[if IE]>.

From MSDN:

Important As of Internet Explorer 10, conditional comments are no longer supported by standards mode. Use feature detection to provide effective fallback strategies for website features that aren't supported by the browser.

Upvotes: 3

Master.Deep
Master.Deep

Reputation: 812

You have missed type of the link you are adding. It should be

<!--[if IE]>

    <link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri(); ?>/css/ie.css" media="screen" type="text/css" />

<![endif]-->

Upvotes: 0

Related Questions