{"id":168,"date":"2013-03-18T20:45:04","date_gmt":"2013-03-18T20:45:04","guid":{"rendered":"http:\/\/www.webninjataylor.com\/library\/?p=168"},"modified":"2014-06-24T21:42:05","modified_gmt":"2014-06-24T21:42:05","slug":"css-nth-child-pseudo","status":"publish","type":"post","link":"https:\/\/webninjataylor.com\/library\/css-nth-child-pseudo\/","title":{"rendered":"CSS3 :nth-child Pseudo"},"content":{"rendered":"<p>The CSS3 :nth-child pseudo selector can be used to add special rules to specific elements in a set, for example&#8230;<\/p>\n<pre>.myList li<strong>:nth-child(3n+3)<\/strong>\u00a0{\r\n    color: #ffffff;\r\n}<\/pre>\n<p>&#8230;sets the color of every 3rd list item to red (3, 6, 9, &#8230;). \u00a0Specifying just a single\u00a0number would only\u00a0effect that element in the set&#8230;<\/p>\n<pre>.myList li<strong>:nth-child(5)<\/strong>\u00a0{\r\n    color: #ffffff;\r\n}<\/pre>\n<p>&#8230;Colors only the 5th item.<\/p>\n<h2>Resources<\/h2>\n<ul>\n<li><a href=\"http:\/\/css-tricks.com\/how-nth-child-works\/\" target=\"_blank\">How nth-child Works<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The CSS3 :nth-child pseudo selector can be used to add special rules to specific elements in a set, for example&#8230; .myList li:nth-child(3n+3)\u00a0{ color: #ffffff; } &#8230;sets the color of every 3rd list item to red (3, 6, 9, &#8230;). \u00a0Specifying just a single\u00a0number would only\u00a0effect that element in the set&#8230; .myList li:nth-child(5)\u00a0{ color: #ffffff; } [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144],"tags":[19],"class_list":["post-168","post","type-post","status-publish","format-standard","hentry","category-web-shots","tag-css"],"_links":{"self":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/comments?post=168"}],"version-history":[{"count":4,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/168\/revisions"}],"predecessor-version":[{"id":3386,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/168\/revisions\/3386"}],"wp:attachment":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/media?parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/categories?post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/tags?post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}