[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/css/ - CSS Masters

Advanced styling, animations & modern CSS techniques
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1783838620491.jpg (119.46 KB, 1024x1024, img_1783838581019_ep5h04lq.jpg)ImgOps Exif Google Yandex

e885a No.1870

you can avoid the usual flexbox headache by using a single line of css. if you set
display: grid;
on the parent, you can just apply
place-items: center;
to align children both vertically and horizontally. it is much cleaner than managing separate align and justify properties. no more margin auto hacks are needed for simple layouts.
>the ultimate shortcut for centering content
**it even works for single-element centering w/o extra wrappers

e885a No.1871

File: 1783839880254.jpg (89.55 KB, 1024x1024, img_1783839840386_rex877ju.jpg)ImgOps Exif Google Yandex

>>1870
i've been using this for a while, but does it behave differently than flexbox when u have multiple children in the same container? i'm still trying to figure out if place-items will overlap them or just stack them.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">