Design comparison
Solution retrospective
I think in this project one thing that I learned the most is related to <div> management in HTML and border-rounded in CSS.
the thing that still makes me curious is how to place the object right in the middle, isn't there a special way? because I manually set margin width, left and top only.
Community feedback
- @samaelwebdevPosted over 1 year ago
your design looks awesome, one way to center items horizontally and vertically is to wrap all of your content inside a container set the display to flex and use the align and justify properties.
happy coding ...
more info here
https://grid.malven.co/
https://flexbox.malven.co/
1 - @lucaliebenbergPosted over 1 year ago
Hi @Agus2711,
Yes there is another way, instead of using margin. You can set your body element to be:
/* CSS */
body { display: flex; height: 100vh; justify-content: center; align-items: center; margin: 0 auto; }
This should center align the item, whether you are on Desktop or Mobile.
I hope this has helped 👌
1 - @0xabdulkhaliqPosted over 1 year ago
Hello there 👋. Congratulation on successfully completing your first challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
HTML 🏷️:
- Use semantic elements such as
<main>
for<div class="container">
and<footer>
for<div class="attribution">
to improve accessibility and organization of your page.
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
0
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