SyntaxFix
Write A Post
Hire A Developer
Questions
This approach will not limit element's width when using margins in flexbox
top: 0; left: 0; transform: translate(calc(50vw - 50%));
Also for centering it vertically
top: 0; left: 0; transform: translate(calc(50vw - 50%), calc(50vh - 50%));