Design comparison
Solution retrospective
I am proud of how I had well-organized semantic HTML, used mobile-first design, and lastly, used good use of media queries and BEM to keep everything nicely organizedd.
What challenges did you encounter, and how did you overcome them?Using the different images for different screen sizes. Using the picture HTML element helped with this. Also, learning flexbox basics was a bit of a challenge at first, but I eventually got the hang of it.
What specific areas of your project would you like help with?Maybe on my CSS if there are any recommendations? This project was fairly simple so not too many specific areas.
Community feedback
- @andrew-j-brownPosted 6 months ago
Hi Dolapobj!
Looks good, and the site looks perfect for mobile! Good job with using Scss as well, I didn't use it for much more than color variables lol.
The only difference I saw was the sizing of the desktop card. I really struggled with this part of the challenge myself - the easiest way I could find to format it was to style just the aspects that don't affect layout, such as colors and fonts, and then style the layout for each screen width separately. I didn't do this the first time around, and the mobile styling ended up really messing with my desktop layout.
Here's some relevant parts of my css:
/* universal styling */ ... /* layout styling */ @media (max-width: 48rem) { /* Structures the layout of the mobile card*/ .product-info { display: flex; flex-direction: column; gap: 1rem; } } @media (min-width: 48rem) { /* structures the layout of the desktop card*/ .product-card { max-width: 580px; flex-direction: row; } .product-info { width: 90%; display: flex; flex-direction: column; justify-content: space-between; } }
Also, don't forget to add hover styling to your buttons!
.product-button { ... background-color: $dark-cyan; color: $white; transition: 0.2s opacity; } .product-button:hover { opacity: 0.85; cursor: pointer; }
Sorry for the wall of text lol - Hope this helps and have a great day!
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