From the course: Tailwind CSS Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Box alignment

Box alignment - CSS Tutorial

From the course: Tailwind CSS Essential Training

Start my 1-month free trial

Box alignment

- [Narrator] Once you have items on a flexbox or a grid layout, you can control how those items fit inside those layouts. So, first off we have the option of controlling the space in between items. This is similar to what happened when we were adding dividers in between elements. So the classes are very similar. You say space, and then the direction, and then the amount. So you see, we have a full set of amounts here. Let's take a look at the examples, so we can play around with this, and in here we have a simple set of items. This is set up as a flex group, right here, and then we're specifying that we want space in the X direction of two. So we could make that whatever we wanted to, we could say 20, or any of the other numbers as well. We could do 12. If we wanted to make these columns then we would say, flex-column, here, think it's just flex-col. The layout would go up and down, and then we would want to put this…

Contents