Centering a div
Hello, I'm having a hard time centering this overflowing div.
https://codepen.io/Suggon/pen/wvbrRqa?editors=1100
Is there a specific property that can help achieve this?
(please note that the
inset
-based centering is important for my usecase)2 Replies
You could do something like this:
ooh that's a nice solution!
although it has a tiny issue where smaller divs always take container's full with, fits my usecase regardless
thank you!
update: just realized all divs already take full width regardless of size, because of
inset
🤦
with that out of the way, yes it's the perfect solution 👍