The align-content property for block layouts is now part of Baseline
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Rachel Andrew
Published: April 17, 2024
You can now use the align-content property from CSS Box Alignment
on block and table layouts. This will allow block direction alignment without
needing to create a flex or grid layout.
Browser Support
123
123
125
17.4
The once impossible task of centering an item vertically was made easier by flexbox and grid,
along with the align-content property. However, it did involve creating a
flex or grid layout for no other reason than to do this alignment.
The property was specified for block layout, and in the past few months all
three major engines have shipped the feature.
With align-content available for block layout, you can achieve
vertical alignment without needing to create a flex or grid layout for the property to
work. No additional properties are needed as the item remains a block item, the
only change is to the alignment.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-17 UTC."],[],[]]