Understanding The Complexity Of CSS Specificity

CSS Specificity is one of the most difficult concepts to understand in the Cascading Stylesheet, and often the typically rules applied to CSS development do not apply with CSS specificity. In order to properly code and reduce the time it takes you need to carefully consider and understand how your code will be interpreted by browsers. To ensure your code is readable,¬†you need to completely understand how CSS specificity works. Read More “Understanding The Complexity Of CSS Specificity”

Difference Between :nth-child and :nth-of-type

CSS Selectors

There is a difference¬†between :nth-child and :nth-of-type considered as CSS selectors. The :nth-child refers to the “Nth matched child element”, p:nth-child(2) will select the second child of P tag however p:nth-of-type will select the second matched p element.

:nth-child selector

p:nth-child(2) { color: red; }

Read More “Difference Between :nth-child and :nth-of-type”