@hyrongennike
Posted
Hi @ajay117,
Nice job on your first attempt of the challenge
You can the change the width: 60%
to max-width: 50%;
that way it's more responsive. To center a card easily you can use flexbox replace your body rule with the below.
body {
margin: 0;
background-color: var(--cream);
font-family: "Montserrat", sans-serif;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
in order for this to work you need to remove the following properties every on the main tag rule.
main {
border-radius: 10px;
background-color: var(--white);
margin: 0 15px;
/* position: absolute; */ **remove**
/* top: 50%; */ **remove**
/* left: 50%; */ **remove**
/* transform: translateY(-50%); */ **remove**
}
Hope this is helpful
Marked as helpful
@ajay117
Posted
@hyrongennike thank you so much for your help, it worked and is more responsive. It helped a lot, really appreciate it.