From the course: CSS Layouts: From Float to Flexbox and Grid
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Orientation with flex-direction and flex-wrap - CSS Tutorial
From the course: CSS Layouts: From Float to Flexbox and Grid
Orientation with flex-direction and flex-wrap
- [Instructor] Earlier in this course we talked about using the display property to align elements as inline or block or inline-block. Which essentially could be used for creating rows and columns but with a few quirks. Same with floats, with flexbox, flex items can easily be arranged in rows or columns without any extra fixes. Flexbox aligns items based on two axes, the main axis and the cross axis. Items are also arranged based on the start and end points. Main start and main end on the main axis and cross start and cross end on the cross axis. The direction of the main axis is determined by the flex-direction property. When flex-direction is set to row, which is the default, the main axis is horizontal and the main start and main end will run left to right starting on the left. When flex items are set to columns, the main axis is vertical and the main end run from top to bottom starting from the top. Flex…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Getting started with Flexbox2m 41s
-
(Locked)
Orientation with flex-direction and flex-wrap2m 37s
-
(Locked)
Flexible sizing5m 18s
-
(Locked)
Sizing multiple flex items1m 46s
-
(Locked)
The order property1m 19s
-
(Locked)
Nesting flex containers3m 40s
-
(Locked)
Exercise: Build a layout with Flexbox7m
-
(Locked)
Exercise: Build a layout with Flexbox2m 1s
-
-
-