Design comparison
Solution retrospective
Hello 👋,
I had quite a time learning how to position the icon on the image :hover
🙃.
I am unsure of the quality of my CSS, but as I continue learning, I will revisit these first few projects.
Any tips on where to improve my work would be greatly appreciated.
Going to keep doing the challenges to improve my skills.
Thank you for taking the time to view my solution!
Community feedback
- @ag7621Posted almost 2 years ago
Hello!
Although I'm pretty new to web dev, I think your project looks great! One tip if I may suggest is centering your card using something like
flex
orgrid
instead of setting amargin-top
on thebody
so that it remains responsive.The method I use is setting a
html, body { height: 100%}
on a css reset. Next is setting thebody { display: flex; align-items: center; }
to center it vertically on the page.The issue I've come across using an
attribution
andflex
is that it centers both the content and attribution together. To combat that I've been setting mine as afooter
with the following.attribution { position: fixed; bottom: 0; left: 0; width: 100%; text-align: center; }
the
bottom: 0;
andleft: 0;
pushes it to the bottom, and left withwidth: 100%;
allowing it to take the full width of the page. Lastlytext-align: center;
to allow it to center within the width. This resource has helped me in learning how to use flex CSS Tricks - FlexboxHope that helps some. Happy Coding!
-Aaron
Marked as helpful0@kylekasprzykPosted almost 2 years ago@ag7621, thank you for the help! I will try this and check out the article on how to use flex. Thanks!
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