Skip to content

Instantly share code, notes, and snippets.

@EvanLovely
Created October 23, 2011 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EvanLovely/1307264 to your computer and use it in GitHub Desktop.
Save EvanLovely/1307264 to your computer and use it in GitHub Desktop.
Targeting specific numbered elements with CSS
/* Works in IE7+ */
ul li:first-child + li + li {
}/* Targets the 3rd list item */
@EvanLovely
Copy link
Author

Warning: for it to work in IE7 there can be no comment before the first child as it counts that as the first child.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment