{"id":50,"date":"2012-01-10T19:01:53","date_gmt":"2012-01-10T19:01:53","guid":{"rendered":"http:\/\/tier7.net\/blog\/?p=50"},"modified":"2012-01-12T20:48:42","modified_gmt":"2012-01-12T20:48:42","slug":"affecting-a-series-of-stack-elements-with-css","status":"publish","type":"post","link":"https:\/\/tier7.net\/blog\/2012\/01\/affecting-a-series-of-stack-elements-with-css\/","title":{"rendered":"Affecting a series of (recursive) elements with css"},"content":{"rendered":"<p>Many sites use some form of rating system for content &#8211; here is an example of how to create series of elements for a ranking meter using only html and css.<\/p>\n<p>HTML<\/p>\n<pre>&lt;div id=\"stars\"&gt;\r\n  &lt;div class=\"star\"&gt;\r\n    &lt;div class=\"star\"&gt;\r\n      &lt;div class=\"star\"&gt;\r\n        &lt;div class=\"star\"&gt;\r\n          &lt;div id=\"innermost\" class=\"star\"&gt;\r\n          &lt;\/div&gt;\r\n        &lt;\/div&gt;\r\n      &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>CSS<\/p>\n<pre>.star {\r\n  display:block;\r\n  width:20px;\r\n  height:20px;\r\n  margin:0px;\r\n  padding-left:20px;\r\n  background:#00f;\r\n  border-left:1px solid #f00;\r\n}\r\n#innermost {padding-left:0px;}\r\n#stars .star:hover{background:#ff0;}<\/pre>\n<p>Live Demo here\u00a0<a href=\"http:\/\/jsfiddle.net\/MpmMa\/\">http:\/\/jsfiddle.net\/MpmMa\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many sites use some form of rating system for content &#8211; here is an example of how to create series of elements for a ranking meter using only html and css. HTML &lt;div id=&#8221;stars&#8221;&gt; &lt;div class=&#8221;star&#8221;&gt; &lt;div class=&#8221;star&#8221;&gt; &lt;div class=&#8221;star&#8221;&gt; &hellip; <a href=\"https:\/\/tier7.net\/blog\/2012\/01\/affecting-a-series-of-stack-elements-with-css\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6,11,9,5],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-web-development","tag-css","tag-design","tag-web-development-2","tag-xhtml"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":12,"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":61,"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions\/61"}],"wp:attachment":[{"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tier7.net\/blog\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}