Flexbox Flashcards
make .row a flex container
.row {
display: flex;
}
make .row container a multi-line flex container
.row {
display: flex;
flex-wrap: wrap;
}
Give .row the flexbox property and value that will place the first and last items along its edges, then equally distribute the space between the other items.
.row { display: flex; flex-wrap: wrap; justify-content: space-between; }
Select the class .column and use the flex item property and value that will expand the columns to fill the space of the row.
.column {
flex-grow: 1;
}
target .primary and give it twice as much space as the other flex items.
.primary {
flex-grow: 2;
}
align the columns to the vertical center of .row
.row {
align-items: center;
}
make .row and inline-flex container
.row {
display: inline-flex;
}
change flex-direction of .container to column
.container {
display: flex;
flex-direction: column;
}
reverse the order of .nav items
.nav {
display: flex;
flex-direction: reverse-row;
}
create a multi-column .container with a limited height of 280px
.container { display: flex; flex-direction: column; flex-wrap: wrap; height: 280px; }
aligns the .container content to the left
.container { display: flex; flex-wrap: wrap; justify-content: flex-end; }
spreads out items of the container evenly, including the ones close to the edge of the container)
.container { display: flex; flex-wrap: wrap; justify-content: space-around; }
left justifies .item-1 and right justifies all other items
.item-1 {
margin-right: auto;
}
place .item-6 in front of .item-1
.item-6 {
order: -1;
}