Screen Layout Using Flex
Learn about and practice using flex to make your layouts better.
We'll cover the following
In this lesson, we’ll learn to arrange the elements in the view. Everyone who has worked with CSS should know about Flexbox.
Flexbox works similar to CSS, with a few minor changes like:
-
flexDirection
has a default value of column instead ofrow
. -
alignContent
has a default value offlex-start
instead ofstretch
. -
flexShrink
has a default value of0
instead of1
.
Tip: Using
justifyContent
,alignItems
andflexDirection
help you achieve your desired layout.
The flex
element
The flex
element is used to specify how much space the child elements can take up.
Get hands-on with 1400+ tech skills courses.