Center content without a container - the perfect fallback for Grid based layouts

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

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

IntermediateUI9 min

About this video

Shows how to center content without an extra container element, using a technique from Lea Verou's CSS Secrets as a fallback for CSS Grid layouts. It is aimed at people who build web layouts and want to avoid unneeded markup.

What you’ll learn

  • Center content without an extra wrapper element
  • Build a fallback for older browsers under a CSS Grid layout
  • Avoid unneeded markup when laying out a page with CSS Grid