DEV Community

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

Collapse
 
deroldo profile image
João Vitor Bragion Deroldo de Oliveira

Take a look at this pen: codepen.io/joaoskr/pen/eYmPNBG

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

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