@Hassiai
Posted
To center the main on the page using grid, add min-height: 100vh and place-items center to the body. There is no need to give the main a margin value.
To center the main on the page using grid:
body{
min-height: 100vh;
display: grid;
place-items: center;
}
Use relative units like rem or em as unit for the margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
@SlavenaDuhneva
Posted
@Hassiai Thank you so much for your advice ,Hassia !