A practical guide to understanding how CSS works under the hood, covering three key areas: CSS layout models (Normal Flow, Flex, Grid, Positioned, Table) and how they affect available properties like z-index; CSS specificity and how browsers score and resolve conflicting rules using a four-column system; and collapsing margins, explaining how adjacent vertical margins interact and how to prevent unwanted collapsing with physical barriers like borders or padding.

10m read timeFrom neciudan.dev
Post cover image
Table of contents
How Does CSS actually work? 🔗Specificity. Rules are made to be followed 🔗Collapsing Margins 🔗In Conclusion 🔗

Sort: