Skip to content

Instantly share code, notes, and snippets.

@EvanLovely
Created October 23, 2011 11:36
Show Gist options
  • Select an option

  • Save EvanLovely/1307264 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
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