{"id":21282,"date":"2017-05-03T01:19:50","date_gmt":"2017-05-03T01:19:50","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=21282"},"modified":"2017-05-03T01:19:50","modified_gmt":"2017-05-03T01:19:50","slug":"css-selectors-by-descendant","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/css-selectors-by-descendant\/","title":{"rendered":"CSS:  selectors:  by descendant"},"content":{"rendered":"<h1>Tutoring web design, so many fun tricks can present themselves.  The tutor brings up one from his reading.<\/h1>\n<p>In a CSS stylesheet, you have tremendous fine-tuning potential based on contextual selection.  Suppose you want, for instance, to render all list entries in ordered lists red, but in unordered lists, blue.  The following code<\/p>\n<div style=\"font-family:monospace;font-size:120%;white-space:pre-wrap\">\nol li{color:red}<\/p>\n<p>ul li{color:blue}\n<\/p><\/div>\n<p>does just that.  It differentiates the li elements based on their parentage (ol vs ul).<\/p>\n<p>HTH:)<\/p>\n<p>Source:<\/p>\n<p>Meyer, Eric A.  <u>CSS Pocket Reference<\/u>.  Sebastopol:  O&#8217;Reilly Media, Inc., 2004.<\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tutoring web design, so many fun tricks can present themselves. The tutor brings up one from his reading. In a CSS stylesheet, you have tremendous fine-tuning potential based on contextual selection. Suppose you want, for instance, to render all list &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/css-selectors-by-descendant\/\"> <span class=\"screen-reader-text\">CSS:  selectors:  by descendant<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1631,837],"tags":[2300,2299],"class_list":["post-21282","post","type-post","status-publish","format-standard","hentry","category-css","category-web-design","tag-css-contextual-selectors","tag-css-descendant-selectors"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/21282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=21282"}],"version-history":[{"count":4,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/21282\/revisions"}],"predecessor-version":[{"id":21286,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/21282\/revisions\/21286"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=21282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=21282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=21282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}