Andrew's Digital Garden

display: flow-root

display: flow-root is very similar to display: block, but it creates a new block formatting context with flow layout formatting.

This is helpful for two main things:

  1. It's a better solution to clearfix, when using float
  2. Fixes issues with [[20230116021937-margin-collapse]], especially in the parent/child collapse situation.

[[css]]

display: flow-root