Alexandreβ’ 10
@mmuuttii
Posted
hey man you can use display:flex; align-items:center ; justify-content: center;
or sometimes i usally in tag body like this: body { display: grid; align-items:center; height: 100vh; }
really nice job
1
Looking to hire developers?
@mmuuttii
Posted
hey man you can use display:flex; align-items:center ; justify-content: center;
or sometimes i usally in tag body like this: body { display: grid; align-items:center; height: 100vh; }
really nice job
@Eyuleo
Posted
you can center it easily with grid or flex
body{
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
or
body{
min-height: 100vh;
display: grid;
place-content: center;
}
hope this helps.
@dondelice257
Posted
you did it well, to center the div automatically you can use margin:auto and height:100vh
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord