hitmorecode• 6,230
@hitmorecode
Posted
Congratulations well done. Just a few tips
- Make a habit of using css reset.
/* this is a simple css reset. this reset will remove unnecessary empty spaces */
* {
margin: 0;
padding: 0;
box-size: border-box;
}
- In this case you can use flexbox or css grid to place the card in the middle of the page
body {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
min-height: 100vh; /* make a habit of setting the height of the body to min-height 100vh. this will make the height more responsive */
font-size: .8rem;
font-family: "Outfit", sans-serif;
text-align: center;
color: hsl(218, 44%, 22%);
background-color: hsl(212, 45%, 89%);
}
main {
width: 350px;
height: 500px;
background-color: white;
/* margin: 10% auto; */ /* you can remove this, flexbox will do the job */
padding: 3% 1% 0 1%;
border-radius: 10%;
}
- If the border radius is less than 50%, avoid using % to dimension border radius. Use px, rem, em instead. You have a border radius of 10% if you look closer you will see a difference in the radius.
Marked as helpful
0
Megan May• 170
@mooogz
Posted
@hitmorecode Ahh I completely forgot about the reset! This all helps a lot, thank you. I need more practice with flexbox definitely so I'll work on that next.
0