Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Browse all series

CSS Flexbox Simplified

Flexbox is no longer an advanced topic in CSS. Today, it's an essential tool for styling modern web pages. In this course, we'll use a variety of real-world examples and components to explore all of the CSS properties related to flexbox. These examples will help you to better understand the core concepts and commit them to memory.

Progress

Series Info

Episodes
12
Run Time
1h 29m
Difficulty
Beginner
Last Updated
May 9, 2023
Version
Latest

Series Episodes

  1. Episodes (12)
    1. First Look at CSS Flexbox

      Flexbox is a crucial tool for styling modern web pages, making it easy to create flexible layouts with minimal code. In the tutorial, I'll demonstrate how to create a horizontal navigation menu and a testimonial section with varying widths and heights.
    2. Spacing and Alignment

      In this tutorial, you'll learn how to use CSS Flexbox to create a navigation menu. We'll discuss the use of the gap property for spacing between elements, the justify-content property for horizontal alignment, and the align-items property for vertical alignment.
    3. Wrap Items Into Multiple Rows

      Next up, I'll use flexbox to demonstrate how to create a responsive section of dummy logos for various fictional companies. We'll discuss previously reviewed CSS properties, as well as new ones like flex-wrap and align-content.
    4. Cross-Axis Alignment and Flow Direction

      In this episode, we'll use the flex-direction property to allow for responsive layouts. We'll discuss the importance of vertical stacking for mobile devices and utilizing media queries for different screen sizes. Finally, we'll review cross-axis alignment.
    5. Grow and Shrink Flex Items

      There are two CSS properties that help you control the growing or shrinking of flex items: flex-grow and flex-shrink. In this episode, we'll learn how their various values affect the sizing.
    6. The Flex Property Decoded

      The flex property is a shorthand for the flex-grow, flex-shrink, and flex-basis properties. In this episode, we'll learn how to use this flex property to control the sizing of your flex items.
    7. Adjust the Order of HTML Elements

      In this episode, we'll learn how to use the order property to adjust the placement of flex items. This can be particularly useful for responsive layout decisions. Let's have a look!
    8. Aligning Individual Items

      You've learned how to align all items by leveraging flexbox, but in this episode you will see how to modify that alignment for individual items, as well.
    9. Flexbox and Auto Margins: A Powerful Combo

      Let's learn how to utilize auto margins in Flexbox to achieve various alignment effects, including moving a specific flex item, solving the sticky footer problem, and centering elements.
    10. Make a Flex Container Inline

      Next up, in this episode you'll learn how to use inline flex to make a container act as an inline element instead of a block level element.
    11. Test Everything You've Learned About Flexbox

      In this episode, we walk through creating a complete, responsive Flexbox layout for a webpage, focusing on mobile-first design and then adapting it for larger screens using media queries.
    12. Flexbox vs Grid: Which to Choose?

      In this final episode of the series, we discuss the differences between Flexbox and Grid, providing guidelines to help you decide which one to use for different scenarios. This will make your code shorter, more readable, and maintainable.

Continue Learning