order-summary-component using HTML + CSS
Design comparison
Solution retrospective
I have 2 questions:
-
Is it better to use responsive units for card width/height or absolute units?
-
Which is better to use?
.annual-plan, .annual-plan div, .annual-plan div div { display: flex; }
.annual-plan, .annual-plan .subcontainer, .annual-plan .subcontainer .subcontainer-subcontainer { display: flex; }
Community feedback
- @RazaAbbas62Posted 10 months ago
Hi, It is generally recommended to use responsive units, such as percentages or viewport units, for card width/height instead of absolute units. Responsive units ensure better adaptability to different screen sizes and devices, providing a more consistent and user-friendly experience.
For the second question, the second option is more efficient and cleaner. This approach combines the styling for related elements more concisely, making the code easier to read and maintain.
Happy Coding:)
Marked as helpful1@AldrinSeanPereiraPosted 10 months ago@FazeenIjaz Thank you so much for sharing your opinion!
0@RazaAbbas62Posted 10 months ago@AldrinSeanPereira You're welcome! I appreciate you taking the time to read my suggestion.
1
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