Design comparison
Solution retrospective
Hi everyone! My project works for the designated screen widths of 375px and 1440px, but it's not fully responsive. Can you provide some insight on the best way to make a flexbox fully responsive?
Thank you for taking the time to check out my solution!
Community feedback
- @MarcosFarias21Posted over 2 years ago
I would suggest you to search more about breakpoints and media queries. I personally set my breakpoint at the width of 1024px(you can convert it to "em") so devices with a viewport width higher than 1024px(64em) desktop design of the page will be displayed. As well as devices with a viewport width lower than that will have the mobile design of the page. Why 1024px?, well we have to consider the tablets too. But this value can vary depending on how you want the content to be fit on the page.
Marked as helpful1@aszcodingPosted over 2 years ago@MarcosFarias21 That makes sense! I was trying to make the breakpoints match the provided screen width in the challenge, but you're right, it doesn't have to be exactly 375px. I didn't think about that. I'll update my media query to make it more fluid. Thank you for your insight!
0@vanzasetiaPosted over 2 years ago@aszcoding I would recommend writing the styling using the mobile-first approach which means that you are using
min-width
media queries instead ofmax-width
. It often leads to shorter and better performance code. Also, mobile users won't be required to process all of the desktop styles.1@MarcosFarias21Posted over 2 years ago@vanzasetia Well said!. I always approach mobile design first and then apply media queries for desktop version changing some measurement properties and adding some unique desktop style touches.
1 - @vanzasetiaPosted over 2 years ago
Hi, Ashley! 👋
Congratulations on completing your first Frontend Mentor challenge! 🎉 Good effort on this challenge! 👍
Some areas that can be done better.
- There's no need to make the buttons to be
postion: fixed;
. It causes the buttons to overflow from the cards. Also, remove thewidth
property from thebutton
elements as well. It makes the buttons look so narrow. - Remove the
height
from thediv
styling. Most of the time, you want to let the content inside it control its height of it. It's because of better responsiveness and maintainability. Also, I would not recommend setting thehieight
with%
because as you can see in the design comparison, the cards don't have the correct height. - Use CSS to uppercase the text. The uppercased word in the HTML will be spelled by the screen reader (spelled letter by letter).
For your information, the sizes on the
style-guide.md
have nothing to do with the media queries. They are telling you that "this is how your website should look like at these screen sizes". As frontend developers, we should keep making your website looks good in between those screen sizes.That's it! Happy coding! 😁
Marked as helpful0@aszcodingPosted over 2 years ago@vanzasetia Thank you so much for taking the time to review my project and for all of your feedback! I will make the updates you mentioned, and keep these things in mind for future projects as well.
0 - There's no need to make the buttons to be
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