We may earn an affiliate commission when you visit our partners.
Course image
Peter Sommerhoff
  • vertically align any element

  • create modern grids

  • take up remaining space

  • add spacing between elements

  • implement complete site layouts

  • and much more.

More goodies inside this course:

Read more
  • vertically align any element

  • create modern grids

  • take up remaining space

  • add spacing between elements

  • implement complete site layouts

  • and much more.

More goodies inside this course:

  • I'll answer all questions you may have along the way to make sure you reach your learning goals

  • I've added manual, high-quality captions (CC) to this course

  • To see Flexbox in practice, 3 mini-projects will manifest your skills and enable you to use Flexbox productively in future web design projects.

What Students Say About Me (taken from various courses of mine)

Such a great course. second one for me with Peter Sommerhoff.a great Instructor, uses very easy way to explain the materials.

- Ahmed

I absolutely LOVE this course, it teaches everything you need in details and more. They really do listen to their students and answer as fast as the road runner. Thanks so much for posting your course and I am looking forward other courses.

- Ana

Great course, Peter explained it thoroughly, and he answers any questions within a day.

- Dunja

The course covered the required information quickly and concisely without fluff or wasted motion. It provides sufficient pointers to additional information and documentation. I thought it was a good value.

- Robert

I'm glad to have received such great reviews from my students and I'll do my best to provide you with the best learning I can as well.

Check out the free preview videos below.

I look forward to seeing you inside :)

In this tutorial, you'll learn to use each and every Flexbox property:

Styling flex containers:

  1. flex-direction

  2. justify-content

  3. align-items

  4. flex-wrap

  5. align-content

Then individual flex items:

  1. order

  2. align-self

  3. flex-grow

  4. flex-shrink

  5. flex-basis

  6. flex

At the end, we'll look at real-world Flexbox examples to see what kinds of layouts can be achieved:

  1. Simple grids with Flexbox where all columns in a row have the same size

  2. More advanced Flexbox grids where columns can have arbitrary sizes

  3. Vertical centering to vertically align any element

  4. Media objects, the popular OOCSS pattern

  5. The Holy Grail Layout, a complete site layout with sidebars and sticky footer

As a bonus, this course includes a complete Flexbox Cheat Sheet that you can use to recap all you've learned and to refer back to while using Flexbox.

Additionally, I included the code for a Flexbox demo showcase  which is like an interactive cheat sheet for you to see in the browser that contains every property and every layout example from this tutorial.

Enroll now

What's inside

Learning objectives

  • Use css flexbox confidently to create modern layouts
  • Create web site designs more effectively
  • Write high-quality and reusable css code
  • Vertically align any element
  • Take up the remaining space in a container
  • Beautiful responsive galleries with flexbox
  • Implement the so-called holy grail layout

Syllabus

Learn how to best follow along this course

Thanks so much for joining this course!

Now, let's make sure you get the most out of this course :)

Read more

Learn about what Flexbox is and what you can do with this new CSS box model to make your job easier and work more productively.

Flexbox is supported by 97.5% of users worldwide (Feb 2017, caniuse.com) with prefixing. Only IE 10 and below, and old Android browsers are not supported.

Thus, you can now finally start using Flexbox for most audiences to use very concise and beautiful solutions for tasks that have been unnecessarily complicated before.

Prefixing can be done using intelligent code editors, online tools, or build tools.

There is no setup required to use Flexbox, it's part of the CSS 3 standard and not a framework or library. Of course you should have a code editor that knows Flexbox and can offer autocomplete etc., such as Sublime Text, Atom or an IDE.

Flexbox uses the concepts of main axis and cross axis. If the flex container is defined as a row, the main axis will be horizontal and the cross axis thus vertical. If the container is a column layout (defined via flex-direction later), it's the other way around.

The cross axis is always perpendicular to the main axis.

It's important to understand this concept to know what the effect the Flexbox properties will have later on in this course.

This is your chance to test your knowledge of this section!

In Flexbox, you can define the flex container to have a row or column layout using either flex-direction: row or flex-direction: column.

Also, if you want the flex container to be filled from the end of the main axis (e.g. from the right in a row), you can add reverse to the values: flex-direction: row-reverse or flex-direction: column-reverse.

Valid values are:

  • flex-direction: row; (default)
  • flex-direction: column;
  • flex-direction: row-reverse;
  • flex-direction: column-reverse;

Let's see if you can recall the most important info about flex-direction.

With justify-content, you can specify how flex items will align along the main axis and what spacing they'll have.

Valid values are:

  • justify-content: flex-start;
  • justify-content: flex-end;
  • justify-content: center;
  • justify-content: space-around;
  • justify-content: space-between;

Try recalling what's essential about justify-content.

With align-items, flex items can be aligned along the cross axis. For example, align them at the top or bottom (of a row).

Valid values are:

  • align-items: stretch;
  • align-items: flex-start;
  • align-items: flex-end;
  • align-items: center;
  • align-items: baseline;

Test your knowledge of the align-items property!

To create multiple rows or columns, you can enable flex-wrap by using either wrap or wrap-reverse as the default, in contrast to the default value nowrap.

This way, flex items will flow into the next or column once it would overflow. With flex-wrap: nowrap, it may well happen that your flex container will overflow.

Valid values are:

  • flex-wrap: nowrap; (default)
  • flex-wrap: wrap;
  • flex-wrap: wrap-reverse;

Test what you just learned about flex-wrap!

Once you have multiple rows or columns, you will probably want to control the alignment and spacing of these rows/columns. This is exactly what align-content is for, which is essentially the same as justify-content but for the cross axis. Thus, align-content only makes sense once you have more than one row or column.

Valid values are (same as justify-content):

  • align-content: flex-start;
  • align-content: flex-end;
  • align-content: center;
  • align-content: space-around;
  • align-content: space-between;

Check your knowledge about align-content!

With order, you can change the order of your flex items independent of their actual order in the HTML markup. This allows for more dynamic layouts without relying heavily on JavaScript.

The default value for order is 0, thus you have to use a negative number to move an item to the front.

Valid values are:

  • All positive numbers, negative numbers, and zero.

In Flexbox, align-self allows you to override whatever basic layout you set via justify-content. Normally, you would of course do this only for specific flex items which should not follow the parent layout.

Valid values are:

  • same as justify-content

By default, flex items will not take up remaining space in their parent. With Flexbox, you can simply set flex-grow to 1 or above to allow a flex-item to fill remaining space.

If multiple flex items have flex-grow set to >0, the remaining space will be split up between them depending on their flex-grow number - the higher the number is, the more they will expand. For details about the calculation, check the video.

Valid values are:

  • 0 (default)
  • positive numbers

Check your knowledge on the flex-grow property, this one is essential!

If the flex container cannot contain all its items with their specified size, the flex items will by default be allowed to shrink in order to fit. However, Flexbox will only shrink items to some degree (depending on their content and padding) so the flex container may still overflow.

You can disable shrinking for flex items by setting flex-shrink to 0. Similarly, larger values for flex-shrink will make it shrink more compared to other items.

Valid values are:

  • 1 (default)
  • 0 (forbid shrinking)
  • all positive numbers

Test what you learned about flex-shrink in this quiz!

In Flexbox, flex items will only adhere to width and height properties if there is no value for flex-basis specified. However, the best practice is to use flex-basis which will refer to width in row containers and to height in column containers.

When calculating the size of each flex item, the flex-basis value will be evaluated first. Only after that, flex-grow and flex-shrink will be used to divide up remaining (or overflowing) space.

Valid values are:

  • Any px, em, rem, % values (like you would to for width/height)

Congrats for making it here.

Check what you learned about flex-basis, the last property of the Flexbox box model.

This first solution for Flexbox grids uses minimal markup and CSS code but is already powerful enough for a majority of use cases.

Each grid row will be in its own container, with all elements spanning the same size inside the container via flex: 1. You can use this for teasers showing advantages of your product, review blocks or any other simple multi-column module.

In this solution, you'll create more flexible grids with Flexbox which use flex-wrap to create galleries with multiple rows in one flex container. Also, via classes with different flex-basis values, you'll be able to define how much space each flex item should take up.

This solution is for more advanced galleries where the items in one row should not necessarily be of the same size.

Ever tried vertical-align: middle to no avail? Well, it only works for inline elements and table cells. Finally, with Flexbox you can center any element with just one or two lines of code. This is one of the things that should have been possible in CSS right from the beginning.

Using a flex container and align-items: center, you're now able to vertically center any element inside a flex container. This tutorial shows you two different use cases for this.

A media object is a module with a picture and some content, possibly nested. Think comment sections on a blog. It's a highly useful and reusable module made popular by the OOCSS approach (object-oriented CSS).

Here, you'll learn to easily create flexible media objects using Flexbox which are highly maintainable and fulfill more requirements than described above. In the video, we'll discuss all we want the media object to be able to do.

The Holy Grail Layout is essentially a 3-column layout with a header and a sticky footer where all columns should have equal height at all times, the footer should be sticky, and the HTML markup for the content should come before the markup for both sidebars.

Implementing this layout with CSS was only possible with some kind of compromise before. With Flexbox, you're finally able to use a Holy Grail Layout. In this lecture, I'll show you how.

All properties of Flexbox in one PDF overview.

This is essentially a PDF version of the showcase, so you can always look at this interactively and even modify it using the showcase code.

All you've learned in this course!

Let me know if you have any suggestions for another example of Flexbox in practice :)

Check out other web design & development courses of mine for $10.

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Career center

Learners who complete Complete Flexbox Course: Master CSS3 Flexbox for Good will develop knowledge and skills that may be useful to these careers:

Reading list

We've selected 50 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Complete Flexbox Course: Master CSS3 Flexbox for Good.
Stands as the defining, witty classic on intuitive web usability, teaching designers how to craft interfaces that guide user attention effortlessly without cognitive friction or confusion.
Introduced the historic concept of responsive web design, teaching designers how fluid grids, flexible images, and CSS media queries produce layouts that adapt gracefully across all viewports.
Explores advanced techniques and variations of the Holy Grail Layout, providing solutions for complex layout scenarios.
An exhaustive, master-level reference manual on CSS layout systems, diving deep into Flexbox, Grid, Cascade resolution, custom properties, and advanced compositing specifications.
Covers advanced CSS techniques, including the Holy Grail layout. It good resource for experienced developers who want to learn more about the latest web design trends.
Provides a comprehensive and in-depth understanding of CSS, covering its fundamental concepts and advanced features. It's an excellent resource for gaining a broad understanding and also serves as a valuable reference tool due to its thorough coverage of CSS specifications. The latest edition includes contemporary topics.
Delivered the landmark manifesto that liberated the web from proprietary hacks, advocating for semantic HTML, CSS styling separation, forward compatibility, and platform-wide accessibility.
A celebrated, visually stunning pedagogical masterwork that demystifies front-end web markup, visual styling, and client-side scripting through clear diagrams and clean typography.
Another essential volume in the 'You Don't Know JS Yet' series, this book delves into the critical concepts of scope and closures in JavaScript. Mastering these topics is vital for writing efficient and maintainable JavaScript code, making this book a must-read for those looking to deepen their understanding.
Provides clever, standards-compliant techniques to solve everyday front-end design problems, covering dynamic borders, responsive shapes, transitions, and elegant UI micro-interactions.
For those looking to deepen their understanding of CSS, this book delves into core concepts and advanced techniques. It helps solidify understanding of how CSS works and explores topics like the cascade, specificity, and layout. The second edition is updated with the latest CSS features.
A comprehensive guide focused specifically on CSS Grid, a fundamental contemporary layout technique. is perfect for those wanting to master grid-based layouts and understand its intricacies for creating responsive designs.
Explores modern CSS features for user experience engineering, detailing container queries, scroll-driven animations, subgrid layouts, and accessibility-first responsive UI architectures.
Covers the latest HTML5 and CSS3 techniques, including the Holy Grail layout. It good resource for developers who want to learn more about the future of web design.
Focuses specifically on responsive web design using HTML5 and CSS3, a highly relevant contemporary topic. It's excellent for understanding how to create layouts that adapt to various devices, a crucial skill in modern web development. It provides practical techniques and insights.
Offers a clear and accessible introduction to grid systems, focusing on their practical application in organizing type and image. It provides a step-by-step approach with numerous visual examples, making it an excellent resource for students and those new to grid-based design. It's particularly useful for solidifying an understanding of how grids function in real-world design scenarios.
Covers HTML5 and CSS3 in-depth, including the Holy Grail layout. It good resource for developers who want to learn more about the latest web design technologies.
Delivers an essential implementation guide for WCAG compliance, screen reader compatibility, ARIA semantics, and inclusive design across modern multi-device responsive web layouts.
For those focused on web development, this book provides a practical guide to using CSS Grid Layout, a powerful tool for creating grid-based web designs. It covers the concepts and implementation of CSS Grid, which is essential for contemporary web layouts. valuable resource for front-end developers.
A popular and practical guide to learning the React library, one of the most widely used front-end frameworks. is excellent for those looking to dive into component-based architecture and build modern user interfaces with React. It's suitable for beginners to React with some JavaScript knowledge.
Explores both the implementation and the creative manipulation of grid systems in graphic design. It delves into the history of grids while also showcasing contemporary examples of how designers effectively use and depart from grid structures. This makes it valuable for those looking to deepen their understanding and explore more experimental approaches to layout.
Specifically targets Flexbox, offering a dedicated and in-depth look at its properties and usage. It's a valuable resource for those who want to focus on mastering Flexbox specifically. It helps solidify understanding through detailed explanations and examples.
Offers a broad introduction to the core technologies of web design and front-end development. It's well-suited for beginners and provides a solid overview of HTML, CSS, and JavaScript, along with web graphics. It can serve as a good initial textbook for those starting in the field.
The foundational Polar Bear bible of digital information organization, teaching designers how to structure navigation, taxonomy, and search systems for large-scale intuitive websites.
Examines the nuanced craft of typography in digital media, instructing designers on hierarchy, proportion, measure, and font pairing to enhance online reading comprehension.
Offers a practical guide to using grids through 100 clear design principles. It provides numerous examples and explanations of different grid types and their applications, making it a solid resource for beginners and those seeking a quick reference for layout ideas. It's helpful for understanding how and when to apply various grid structures.
A comprehensive guide to the Angular framework, known for building large-scale applications. covers Angular from setup to advanced topics, making it suitable for developers who want to learn this powerful framework. The focus on a recent edition ensures coverage of the latest features.
A concise introduction to CSS Grid Layout by a leading expert. great starting point for understanding the core concepts of Grid and how it revolutionizes web layout. It's valuable for both beginners to Grid and those looking for a quick overview.
Outlines core graphic design fundamentals for web creators, guiding readers through color theory, grid balance, texture, visual harmony, and aesthetic layout composition.
Focuses on the critical topic of web performance and the impact of JavaScript. It guides developers in writing JavaScript that is performant and doesn't negatively affect the user experience. Highly relevant for contemporary front-end development and optimizing websites.
Provides a structured approach to learning HTML and CSS, focusing on practical application through complete website examples. It's a good resource for gaining a solid understanding and seeing how concepts are applied in real-world scenarios. The 5th edition covers modern practices.
While not solely about CSS, this book is highly relevant to contemporary CSS practices, particularly responsive design and building resilient websites. It focuses on the philosophy of progressive enhancement, which influences how CSS is approached in modern development.
A concise, practical introduction to semantic HTML5 elements, instructing designers on native document outlining, media embedding, and clean structural markup best practices.
Argues for a mobile-first approach to responsive design.
Provides a comprehensive and in-depth exploration of JavaScript. It's suitable for those who have a basic understanding of programming concepts and want to deepen their knowledge of JavaScript as a language. It covers fundamental programming concepts and then dives into more advanced topics, making it a valuable resource for undergraduates and beyond.
The book that introduced the concept of responsive web design. While the original publication is not recent, the principles remain fundamental. classic and essential reading for understanding how to build websites that adapt to various screen sizes and devices. The second edition provides updated context.
Delves into essential JavaScript design patterns, which are crucial for writing maintainable and scalable code. It's a valuable resource for developers looking to improve their code structure and understanding of common software design principles in a JavaScript context. It's more suitable for those with some JavaScript experience.
Covers CSS3 in-depth, including the Holy Grail layout. It good resource for developers who want to learn more about the latest CSS3 techniques.
Covers HTML and CSS in-depth, including the Holy Grail layout. It good resource for developers who want to learn more about the latest web design technologies.
Provides a hands-on manual of user experience design techniques, detailing user research, wireframing, usability testing protocols, and interactive prototyping methods.
Using the popular Head First approach, this book provides an engaging and visual introduction to HTML and CSS fundamentals. It's well-suited for beginners and helps build a solid understanding of core concepts through a unique learning style.
Responsive web design heavily relies on flexible grid systems. introduces the principles of responsive design, including fluid grids and media queries, which are crucial for creating layouts that adapt to various screen sizes. It provides foundational knowledge for implementing grids in a responsive web context.
An all-in-one guide covering both HTML and CSS in detail. is suitable for beginners and provides a thorough grounding in the fundamentals of both languages, essential for anyone starting in web development.
Bridges behavioral analytics, scientific conversion rate optimization, and interface design, demonstrating how empirical testing and qualitative research drive measurable business results.
Offers a pragmatic modern guide to organizing content and labeling navigation on evolving websites, helping cross-functional teams establish clear information pathways.
Covers CSS in-depth, including the Holy Grail layout. It good resource for developers who want to learn more about the latest CSS techniques.
Explores reusable CSS and HTML code snippets and solutions for common design problems. It's valuable for learning practical approaches to CSS and understanding how to build robust and maintainable web designs. It functions as both a learning text and a reference.
Considered a seminal work in typography, this book offers deep insights into the history, theory, and practice of arranging type. Understanding typographic principles is fundamental to effective grid-based design, particularly in print and digital media. classic and a must-read for anyone serious about design and layout.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Complete Flexbox Course: Master CSS3 Flexbox for Good.
Fundamentals of Web Development
Most relevant
Practical Use Cases of CSS3 Flexbox
Most relevant
Introduction to CSS3
Most relevant
Learn Responsive Web Design
Most relevant
Build Responsive CSS3 Flexbox Holy Grail Layout
Most relevant
Build Responsive Service Page UI using CSS3 Flexbox
Most relevant
CSS3 Flexbox - Mastering the Basics
Most relevant
Modern HTML & CSS From The Beginning (Including Sass)
Most relevant
Advanced Styling with Responsive Design
Most relevant

Udemy Buyer Protection & Guarantee

Verified partner policies & purchase protections

Global Marketplace Leader
Free Trial & Audit

Free Lecture Previews

Free preview video lectures available for all courses; optional 7-day free trial on Personal Plan subscriptions (cancel before trial ends to avoid conversion).

Return & Refund Policy

30-Day Money-Back Guarantee

30-day money-back guarantee on all eligible individual course purchases (provided course content has not been substantially consumed or downloaded). Subscription fees are non-refundable once billed.

Buyer Protections

Verified Academic & Industry Partner

Lifetime access to purchased individual courses and future updates, verifiable certificate of completion, and direct student Q&A forums.

Key Purchase Protections
30-day 100% money-back guarantee on course purchases
Lifetime access on web, mobile, and offline
Certificate of completion included with purchase
Direct instructor Q&A and active student community
OpenCourser Verified Partner Policy details last reviewed: 2026-10-22
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser