This page will show you how Flexbox css works!

THE BASICS

What is Flexbox?

To start, Flex Box is "Flexible Layout". This is done by utilizing various CSS commands which increase layout efficiency by making it easier to align and distribute space among items in a container, even when their size is unknown. We will start with the first three basic commands.

justify-content

align-items

flex-direction

Here are some css examples.

So here we are going to use justify-content andspace-between to add equal space between Joels

#part1 {

display: flex;

justify-content: space-between;

}

Here we will use justify-content andalign-items to put Joel in the exact center of the div.

#part1 {

display: flex;

justify-content: center;

align-items: center;

}

Here we will use align-self andalign-items to put one Joel in the exact center, at the bottom of the div.

#part1 {

display: flex;

align-items: flex-start;

justify-content: space-between

}

.joel1 {

align-self:flex-end;

}

This is what they look like.

joel joel joel
joel
joel joel joel joel joel