Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .parent {
- position: relative;
- }
- /* Child width is 400px & height is 200px */
- .child {
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement