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?