DEV Community

Discussion on: Do you still use "position" to center align vertically and horizontally?

deroldo profile image
João Vitor Bragion Deroldo de Oliveira

Take a look at this pen:

If you remove this properties from domain-toggle class, you'll see what i said about alignment:
position: absolute;
left: 50%;
transform: translateX(-50%);

Thread Thread
titungdup profile image
dhondup Author

That's a nice use case for position alignment. I think it would be difficult to achieve that result with any other method.