A > B
will only select B that are direct children to A (that is, there are no other elements inbetween).
A B
will select any B that are inside A, even if there are other elements between them.
More Related Contents:
- how do I make device specific selectors in css [closed]
- Is there a “previous sibling” selector?
- What does a space mean in a CSS selector? i.e. What is the difference between .classA.classB and .classA .classB?
- CSS selector for first element with class
- What does the “+” (plus sign) CSS selector mean?
- How are the points in CSS specificity calculated
- Is there a CSS selector by class prefix?
- CSS selector for “foo that contains bar”? [duplicate]
- How do I select an element based on the state of another element in the page with CSS?
- Does the order of classes listed on an item affect the CSS?
- Select all child elements recursively in CSS
- CSS “and” and “or”
- Using the last-child selector
- How can I select an nth child without knowing the parent element?
- Can I use variables for selectors?
- How to select label for=”XYZ” in CSS?
- In which direction do selector engines read, exactly?
- Are CSS3 ::before and ::after pseudo elements supported by IE9 or not?
- What’s the difference between html[lang=”en”] and html:lang(en) in CSS?
- How can I apply styles to multiple classes at once?
- CSS property value from class name
- Can I colour backgrounds of selected items in HTML select options with CSS only?
- LESS CSS: abusing the & Operator when nesting?
- CSS3 combining selectors with OR instead of AND
- Why doesn’t this CSS :not() declaration filter down?
- Should I use single colons (:) or double colons (::) for before, after, first-letter and first-line pseudo-elements?
- How to show the first N elements of a block and hide the others in css?
- What is the difference between :before and ::before?
- CSS class repetition to increase specificity
- select second child