row
margin: auto
is an alternative to justify-content: center
and align-items: center
.
Instead of this code on the flex container:
.container {
justify-content: center;
align-items: center;
}
We can use margin: auto
the flex item:.container div {
margin: auto;
}
(when there is only one flex item)no-wrap
is the default value of the property@media (min-width: 900px) {
.container {
display: flex;
justify-content: space-between;
}
}
margin-right
property:.container div {
margin-right: 40px;
}
.container div:last-child {
margin-right: 0px;
}
Flex way of space between flex items:.container {
display: flex;
justify-content: space-between;
}
.container div {
flex-basis: 30%;
}
stretch
that means all the flex items will be stretched vertically as default.container {
display: flex;
align-items: stretch;
}