What is display: flow-root and when to use it

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI7 min

About this video

A CSS tutorial explaining the display: flow-root value, how it compares with other display options, and when it can replace the clearfix hack. It suits developers and designers who already write CSS layouts.

What you’ll learn

  • Explain how display: flow-root creates a block formatting context
  • Replace a clearfix hack with display: flow-root where it fits
  • Compare flow-root with other display values for layout