Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #148 from hfrntt/master

Clarify IE selectors quirks
  • Loading branch information...
commit 3a6df5e2a3cbd356a8ec93788bb563d928019df6 2 parents bed36b6 + 90edb9e
Divya Manian authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 posts/selectors.md
View
6 posts/selectors.md
@@ -9,13 +9,14 @@ Most CSS Selectors are supported from IE7 onwards, so you should be safe to use
#### When you sunset IE6 support, you can use:
* `tr > td` : Immediate descendant (child) selector.
-* `dt + dd` : next sibling selector
+* `dt + dd` : next sibling selector*
* `dt ~ dd` : any following sibling
* `div[attr]` and `img[src$=png]` : Attribute selector (starts with, ends with, contains).
-* `p:first-child`
+* `p:first-child`*
* `div:hover` and `:hover` state on all non-`<a>`'s
* `li.food.vegetable` : without worrying about the [chained classes bug](http://paulirish.com/2008/the-two-css-selector-bugs-in-ie6/)
+\* IE7-8 don't update styles properly when elements are manipulated with JS. Usually you have to force the browser to redraw (e.g. hide and show parent element).
#### When you sunset IE7 support, you can use:
@@ -35,6 +36,7 @@ Resources:
* http://www.bennadel.com/blog/2306-What-CSS-Properties-Are-Supported-When-You-Drop-IE6-Support.htm
* http://analogysoft.com/learning/ui-hulk-out/#beyondie6
* http://msdn.microsoft.com/en-us/library/cc351024(v=vs.85).aspx#selectors
+* http://www.quirksmode.org/css/contents.html
[].forEach.call( document.querySelectorAll('td'), function(elem){
if (elem.innerText.trim() == 'No') elem.style.backgroundColor = 'red';
Please sign in to comment.
Something went wrong with that request. Please try again.