@Blackhammer03Submitted almost 2 years ago
hey, community. margin and padding is headache for me. anyone with a quick solution ?
hey, community. margin and padding is headache for me. anyone with a quick solution ?
Nice work!
You can try wrapping everything in a flex container, or since it's the only element in there, the main
tag.
<main> <div class="items"> </div> </main>
Then in your css make the main
tag a flex container, add a height
of 100vh
so the container takes the full height of the available screen space.
To center stuff inside a flex container you can add align-items
and justify-content
and set these properties to center
so the content is centered both vertically and horizontally.
main { display: flex; align-items: center; justify-content: center; height: 100vh }