@Thedeezat
Posted
Hey Raymond š
Nice work on this project š
The whitespace between the containers, can be resolved using flexbox
, you should try this out and see.
.container {
position: relative;
width: 100%;
background-color: hsl(0, 0%, 95%);
}
.card{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
@media screen and (max-width: 40rem) {
.card {
flex-direction: column;
height: initial;
padding: 5rem 0;
}
I decided to remove the transform
property because flexbox
already align the card
for us vertically(as long as the height
is 100vh
) and horizontally, and also remove the whitespace between them.
And It's also best to remove the default padding
and margin
using the universal selector
in your css. And also instead of using px
it's best to use Rem
for font-size, it's a must for accessibility.
* {
margin: 0;
padding: 0;
}
Well that's all, nice work again! i hope you find this useful.