+ 1
You can combine CSS selectors with combinators to target specific elements within the Document Object Model (DOM). For example, let's say you had a numbered list and an unordered list in your DOM if you specified li { color: red; } This would select every list element within the DOM. So both numbered list and unordered list have this rule applied. If you combine CSS selectors you can grab specific list elements. For example, ul li { color: red; } grabs only list elements that are descendants of an unordered list.
10th Feb 2019, 2:34 AM
Brian Oliver
Brian Oliver - avatar