Design comparison
SolutionDesign
Solution retrospective
Starting to learn how to build things mobile first and what was uncomfortable at the beginning is becoming more and more my preferred way to do it. I'm happy to hear more opinions about mobile-first vs desktop first as I'm always open to learning.
Community feedback
- @darryncodesPosted almost 3 years ago
Hi Matthew this is an awesome article discussing the mobile-first approach.
I really like your solution, I think you have nailed it - with a few tweaks it could be perfect:
- there is a typo in your box-sizing declaration:
box-sizing: border-boxxw;
- i would update the background-image declaration to:
background-size: 100% auto;
and removebackground-position: 0 -15rem;
also remove the image at mobile view to closer match the design - you could look at using the
:hover
pseudo-class to help you match the hover/active states in the design. Here is some information and some button hover styling - your design could do with some white space. If you add some padding to the card and div's inside the card it would really help it breathe. Something to look out for is the
gap
property for flexbox, it's experimental now but will make life a lot easier when it get's more support - you could centre your design nicely in the viewport if you remove the
padding
to your<body>
. I think you misseddisplay: flex;
so add that with youralign-items
andjustify-content
declaration along withmin-height: 100vh;
flex-direction: column;
All the best with it all,
Any questions give me a shout!
Marked as helpful1@Mattvp21Posted almost 3 years ago@darryncodes Thanks for the feedback and for helping me deal with that background image! I fixed the issues.
Thanks,
Matt
0 - there is a typo in your box-sizing declaration:
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