@nullpuppy
Posted
Looks good! Very clean!
A few things that can help with overall layout and centering:
body {
display: flex;
flex-direction: column;
align-items: center; /* center content in column horizontal */
justify-content: center; /* center content in column vertically */
margin: auto;
}
For the responsive bit, don't use fixed widths (you're grid is repeat(cnt, size)
. Use something like 1fr
in place of your size instead, which will tell the browser to evenly divide each column into 1/4th of the available space). And then maybe add a max-width to your wrapper (main
in your case). You can also likely reduce your rows to 2, unless you have a specific reason for wanting that many.
Then in your media queries, you'll want to redefine (or remove, depending) the grid/row setting for each card.
Hope that helps!
Marked as helpful