

This places the title, description, and image block in a vertical column inside of the parent card.

For these cards, they are placed in a Flexbox display mode, with the direction being set to column using flex-direction: column.

Line Up: justify-content: space-between #įor the next layout, the main point to demonstrate here is justify-content: space-between, which places the first and last child elements at the edges of their bounding box, with the remaining space evenly distributed between the elements. By setting it to center, both align-items and justify-items are set to center.parent 08. place-items is a shorthand to set both align-items and justify-items at once. I want you to know that it's easier than you think with place-items: center.įirst specify grid as the display method, and then write place-items: center on the same element. Super Centered: place-items: center #įor the first 'single-line' layout, let's solve the biggest mystery in all of the CSS land: centering things. To follow along or play with these demos on your own, check out the Glitch embed above, or visit.
