{"id":262713,"date":"2017-11-29T12:52:39","date_gmt":"2017-11-29T19:52:39","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=262713"},"modified":"2021-05-13T09:27:12","modified_gmt":"2021-05-13T16:27:12","slug":"place-items","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/p\/place-items\/","title":{"rendered":"place-items"},"content":{"rendered":"\n

The place-items<\/code> property in CSS is shorthand for the align-items<\/a><\/code> and justify-items<\/a><\/code> properties, combining them into a single declaration.<\/p>\n\n\n\n

A common usage is doing horizontal and vertical<\/em> centering with Grid<\/a>:<\/p>\n\n\n\n

.center-inside-of-me {\n  display: grid;\n  place-items: center;\n}<\/code><\/pre>\n\n\n\n\n\n\n\n

These properties have gained use with the introduction of Flexbox and Grid layouts, but are also applied to:<\/p>\n\n\n\n