Tagged: selector

Descendant and child selectors

Most css coders are familiar with the basic descendant selector, parent child and use it all the time, perhaps too much. The descendant selector is applied to every single child of parent and that is not always ideal.

The direct child selectors

A better solution in some cases is the direct child selector: parent > child. The difference between this and the descendant selector mentioned above is best explained with a nested list

Continue reading