Grokking CSS for Web Development
Vote

0% completed

​

Descendant combinator (Space)

The selector .post p matches four paragraphs on the page below, and one of them sits two levels deep inside the article. A fifth paragraph on the same page is not matched at all. The difference between those paragraphs is where each one sits in the page, and that is what this chapter's selectors are about.

A selector can describe how two elements are related, not only what each element is. The symbol that connects the two parts is called a combinator. Browsers support four of them, and this chapter covers one per lesson. (A fifth, the column combinator `||

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content