[ 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: 1796048536563.jpg (82.72 KB, 1040x560, img_1796048528239_6q78jx7w.jpg)ImgOps Exif Google Yandex

3ad81 No.2562

i'm tired of seeing people use top 50% and negative margins for everything. if you're using a modern browser just set margin to auto and use ''inset: 0. it works perfectly for centering a fixed-size box inside a relative container without the math headache.
.center-me {position: absolute;inset: 0;margin: auto;width: 200px;height: 200px;}

it's ''way cleaner than the old school way. do you guys still bother with the transform translate trick for simple boxes?


[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 ]