Melvin Aguilar ๐ง๐ปโ๐ปโข 61,220
@MelvinAguilar
Posted
Hi @Richiemore ๐, good job completing this challenge, and welcome to the Frontend Mentor Community! ๐
- There are two modern CSS techniques to center elements:
Using flexbox layout:
body {
margin: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
Using grid layout:
body {
margin: 0;
min-height: 100vh;
display: grid;
place-content: center;
}
Links with more information:
- The Complete Guide to Centering in CSS.
- A Complete Guide to Flexbox (CSS-Tricks).
- How TO - Center Elements Vertically (W3Schools).
- CSS Layout - Horizontal & Vertical Align (W3Schools).
Good job, and happy coding! ๐
0
Ritecโข 30
@Richiemore
Posted
@MelvinAguilar Thank you so much for your guide. i will look into those materials. am really glad.
0