DEV Community

loading...

Discussion on: Few Awesome CSS Snippets I Recently Learned

Collapse
aralroca profile image
Aral Roca

I usually use margin: auto to center the content in the middle.

Collapse
3sanket3 profile image
Sanket Patel Author

Does it work even for the absolute content? I tried but doesn't seems working. Any codepen or something to refer?

Collapse
aralroca profile image
Aral Roca

Sorry, my bad. I was thinking all the moment in relative position. Your code is useful in absolute position, sure!