Learn CSS / Flexbox & CSS Grid

Flexbox: container & items

Access full course

Ready-to-use code

Display flex and inline-flex

See the Pen Flexbox / Display / Flexbox & CSS Grid workshop by In a Rocket (@inarocket) on CodePen.

What you have learned

  • Any HTML element can be a flex container. Child elements of that container are considered flex items.
  • A flex container can be displayed as a block (display: flex) or inline (display: inline-flex).
  • By default, flex items width and height are defined by their content.

References

Newsletter

  • Free Stuff. Exclusive access to new courses, latest news and free resources.
  • No spam. Just real content that's meant to make a difference.