The secret to mastering CSS layouts

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

IntermediateWeb DesignUI17 min

About this video

Explains how parent and child elements affect each other's width and height in CSS, including how child margins affect the parent and how flex and grid change sibling relationships. Aimed at web developers and designers who already write some CSS.

What you’ll learn

  • Predict how a child's width and height affect its parent's layout
  • Recognise when a child's margin collapses through or pushes its parent
  • Choose how flex and grid change the sizing of sibling elements