Design comparison
SolutionDesign
Solution retrospective
I think the result looks pretty good. I guess my only question would be if any of the CSS is weird (like using '%' where I should have used 'px' or vice versa).
Community feedback
- @MelvinAguilarPosted about 2 years ago
Hi @Daniel3-14 ๐, good job completing this challenge, and welcome to the Frontend Mentor Community! ๐
I have some suggestions you might consider to improve your code:
- Use the
<main>
tag to wrap all the main content in your solution instead of using<div class="container">
.
- Use
<footer>
instead of<div class="attribution">
. The<footer>
element contains authorship information.
- The container isn't centered correctly. You can use flexbox to center elements. You can use flexbox to center elements:
body { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
Additionally, remove the margin to center the image correctly:
.container { text-align: center; /* margin: 10% auto; */ margin: 1rem; /* width: 90vw; */ . . . }
Links with more information:
- The Complete Guide to Centering in CSS.
- A Complete Guide to Flexbox (CSS-Tricks).
- How TO - Center Elements Vertically (W3Schools).
- CSS Layout - Horizontal & Vertical Align (W3Schools).
I hope those tips will help you! ๐
Good job, and happy coding! ๐
1 - Use the
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