Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In the light of the evolving thread, I have updated the below:</p> <h2>IE 6</h2> <pre><code>* html .ie6 {property:value;} </code></pre> <p>or</p> <pre><code>.ie6 { _property:value;} </code></pre> <h2>IE 7</h2> <pre><code>*+html .ie7 {property:value;} </code></pre> <p>or</p> <pre><code>*:first-child+html .ie7 {property:value;} </code></pre> <h2>IE 6 and 7</h2> <pre><code>@media screen\9 { .ie67 {property:value;} } </code></pre> <p>or</p> <pre><code>.ie67 { *property:value;} </code></pre> <p>or</p> <pre><code>.ie67 { #property:value;} </code></pre> <h2>IE 6, 7 and 8</h2> <pre><code>@media \0screen\,screen\9 { .ie678 {property:value;} } </code></pre> <h2>IE 8</h2> <pre><code>html&gt;/**/body .ie8 {property:value;} </code></pre> <p>or</p> <pre><code>@media \0screen { .ie8 {property:value;} } </code></pre> <h2>IE 8 Standards Mode Only</h2> <pre><code>.ie8 { property /*\**/: value\9 } </code></pre> <h2>IE 8,9 and 10</h2> <pre><code>@media screen\0 { .ie8910 {property:value;} } </code></pre> <h2>IE 9 only</h2> <pre><code>@media screen and (min-width:0\0) and (min-resolution: .001dpcm) { // IE9 CSS .ie9{property:value;} } </code></pre> <h2>IE 9 and above</h2> <pre><code>@media screen and (min-width:0\0) and (min-resolution: +72dpi) { // IE9+ CSS .ie9up{property:value;} } </code></pre> <h2>IE 9 and 10</h2> <pre><code>@media screen and (min-width:0\0) { .ie910{property:value\9;} /* backslash-9 removes ie11+ &amp; old Safari 4 */ } </code></pre> <h2>IE 10 only</h2> <pre><code>_:-ms-lang(x), .ie10 { property:value\9; } </code></pre> <h2>IE 10 and above</h2> <pre><code>_:-ms-lang(x), .ie10up { property:value; } </code></pre> <p>or</p> <pre><code>@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { .ie10up{property:value;} } </code></pre> <h2>IE 11 (and above..)</h2> <pre><code>_:-ms-fullscreen, :root .ie11up { property:value; } </code></pre> <hr> <h2>Javascript alternatives</h2> <h3><a href="http://modernizr.com/" rel="noreferrer">Modernizr</a></h3> <blockquote> <p>Modernizr runs quickly on page load to detect features; it then creates a JavaScript object with the results, and adds classes to the html element</p> </blockquote> <h3><a href="http://rog.ie/blog/html5-boilerplate-addon" rel="noreferrer">User agent selection</a></h3> <p>Javascript:</p> <pre><code>var b = document.documentElement; b.setAttribute('data-useragent', navigator.userAgent); b.setAttribute('data-platform', navigator.platform ); b.className += ((!!('ontouchstart' in window) || !!('onmsgesturechange' in window))?' touch':''); </code></pre> <p>Adds (e.g) the below to <code>html</code> element:</p> <pre><code>data-useragent='Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)' data-platform='Win32' </code></pre> <p>Allowing very targetted CSS selectors, e.g.:</p> <pre><code>html[data-useragent*='Chrome/13.0'] .nav{ background:url(img/radial_grad.png) center bottom no-repeat; } </code></pre> <hr> <h2>Footnote</h2> <p>If possible, identify and fix any issue(s) without hacks. Support <a href="http://en.wikipedia.org/wiki/Progressive_enhancement" rel="noreferrer"><strong>progressive enhancement</strong></a> and <a href="http://en.wikipedia.org/wiki/Fault_tolerance" rel="noreferrer"><strong>graceful degradation</strong></a>. However, this is an 'ideal world' scenario not always obtainable, as such- the above should help provide some good options.</p> <hr> <h3>Attribution / Essential Reading</h3> <ul> <li><a href="https://jeffclayton.wordpress.com/author/jeffclayton/" rel="noreferrer">Jeff Clayton</a> | <a href="http://browserhacks.com/" rel="noreferrer">Browserhacks.com</a></li> <li><a href="http://keithclark.co.uk/articles/moving-ie-specific-css-into-media-blocks/" rel="noreferrer">Keith Clarke</a></li> <li><a href="http://www.paulirish.com/2009/browser-specific-css-hacks/" rel="noreferrer">Paul Irish</a></li> <li><a href="http://www.webdevout.net/css-hacks" rel="noreferrer">Web Devout</a></li> <li><a href="http://www.thespanner.co.uk/2009/01/29/detecting-browsers-javascript-hacks/" rel="noreferrer">The Spanner</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload