@Hassiai
Posted
There is no need for the section tag in the html and its styling in the css.
There is no need to style the main, give its background-color to the body.
There is no need to style .upper.
Replace the height in .card with a padding value for all the sides, this will prevent the content from overflowing on smaller screens and its a responsive replacement. padding: 1rem which is 16px
.
For a responsive content, replace the width in .card with max-width and increase its value. max-width: 20rem which is 320px
.
Give .lower a margin value for all the sides, text-align: center and a font-size of 15px which is 0.9375rem, this will be the font-size of both p and h1. Give p a margin-top or h1 a margin-bottom value for the space between the text.
To center .card on the page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body.
USING FLEXBOX:
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
USING GRID:
body{
min-height: 100vh;
display: grid;
place-items: center;
}
Use relative units like rem or em as unit for the padding, 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
Marked as helpful
@HIRWA13
Posted
@Hassiai am just a beginner on this but your solution really helped me . Thanks