
Design comparison
Solution retrospective
Generally struggled on the sizing of the container, was unsure how to get it centred for a while.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @JordanKleinbaum
Also for your image not loading, I had the same problem. Make sure you use the exact right file path in your html head section when linking your css. Read this for more help
Marked as helpful - @JordanKleinbaum
Here are a couple ways to Center A DIV:
-position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
-display: grid; place-items: center; min-height: 100vh;
-display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100%;
-position: absolute; inset: 0; margin: auto;
Putting any one of these 4 methods in your body section of your css should center whatever you start making :)
Marked as helpful
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord