select adjacent div css code example
Example 1: adjacent sibling selector
li:first-of-type + li {
color: red;
}
<ul>
<li>One</li> // The sibling
<li>Two</li> // This adjacent sibling will be red
<li>Three</li>
</ul>
Example 2: CSS descendant selectors
<section>
<a href="#"></a> -->--> section a{...}
</section>
.class-selector-name
.nested-class-name {...}
---tag with class="class-selector-name"
|
|--tag with class="nested-class-name" <-- Selected
main h1 {...}
---main
|--h1 <-- Selected
---h1 <-- Not selected!!!