Design comparison
Solution retrospective
Could anyone give me advice on how to center and align objects in a more responsive-friendly way? I would like to understand how to use more percentages to create designs that will look good and scale to the desired screen size via percentages, not just specific @media values.
Would love any tips you might have :)
Community feedback
- @piyathpereraPosted over 2 years ago
Hi Zach, Congratulations on completing the design. Looks Great!
Based on your questions,
You are using display properties to center. which is easiest/correct way to center an box. Learn more about how other elements/boxes behave when a display property added.
You can avoid scrolling behaviour by adding a Relative length units to a parent element.(eg: Box containing the background)
Try to avoid using fixed values for heights and widths. Research on Relative length units that you can use in css, There is a lot of them. "ch" is better for the card's content. You can try them and see what works best for the design. You might not need fixed widths and margins in your container.
Make your design responsive as much as you can without any breakpoints. Breakpoints are as the named suggests used when design breaks. For most challenges you can use combination of flex and grid. To better understand this, Watch “Designing Intrinsic Layouts” by Jen Simmons for more information.
Use semantic HTML as much as you can. It will help in accessibility, and make your code more readable when selecting styles.
Some Good resources to learn css
Keep Building.
Marked as helpful1@zach007jamesPosted over 2 years ago@piyathperera Thank you for all your helpful advice and critique. The MDN Docs are helpful, especially when it comes to responsive units! I just finished watching the 'Designing Intrinsic Layouts" video, and it really opened my eyes to the possibilities of web design while also serving as a starting point for creating better CSS Grid designs. I am currently going through the Responsive Design course and will then complete the Learn CSS course shortly afterward. I will definitely keep building! Thanks, Zach
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