
Design comparison
Solution retrospective
Somewhat proud of making the first website. Havent done anything special, only basic html and css
What challenges did you encounter, and how did you overcome them?Getting used to with the overall process was the difficult part and it can be overcome with practice only
What specific areas of your project would you like help with?How to perfectly center a div using only html and css nothing advanced?
Community feedback
- @tortarugaPosted 2 months ago
hi! on large screens it looks good, but since your .container has a width of 18% it becomes too narrow on smaller screens.
to center a div in a simple way you can use margin: auto, or you can use flexbox on the parent element:
.parent { display: flex; justify-content: center; align-items: center; }
this will center the child element both vertically and horizontally inside of .parent! hope it helps, good luck
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin 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