Nearby lessons
35 of 71↕️ Tailwind CSS - Align (Content, Items & Self)
📖 Align Content – Overview
Align Content utilities control how rows of flex/grid items are distributed along the cross axis when there is extra space. This only has effect when there are multiple lines of items (flex-wrap or multi-row grid).
📏 Align Content Utilities
Available utilities:
content-normal– Default packingcontent-start– Lines at the startcontent-end– Lines at the endcontent-center– Lines centeredcontent-between– Space between linescontent-around– Space around linescontent-evenly– Space evenly distributedcontent-stretch– Lines stretch to fillcontent-baseline– Lines aligned to baseline
Example02
Loading editor…
📖 Align Items – Overview
Align Items utilities control how flex and grid items are aligned along the cross axis (vertical for flex-row).
This maps to the CSS align-items property.
📏 Align Items Utilities
Available utilities:
items-start– Items at the start of cross axisitems-end– Items at the end of cross axisitems-center– Items centered on cross axisitems-baseline– Items aligned to text baselineitems-stretch– Items stretch to fill (default)
Example04
Loading editor…
📖 Align Self – Overview
Align Self utilities override the align-items value for individual flex or grid items.
This maps to the CSS align-self property.
📏 Align Self Utilities
Available utilities:
self-auto– Inherits from parent align-itemsself-start– Align to start of cross axisself-end– Align to end of cross axisself-center– Center on cross axisself-stretch– Stretch to fillself-baseline– Align to baseline
Example06
Loading editor…
🧠 Test Your Knowledge
6 QuestionsProgress: 0 / 6