Product preview card component (use only HTML & CSS)
Design comparison
Solution retrospective
Hi again, everyone! (* ̄0 ̄)ノ
Today I finally finished my next project and I have some questions:
- Should I use relative units in image size? And border-radius size? (⊙_⊙)?
Thanks for attention! 😊
Community feedback
- @RickHalmogueraPosted over 1 year ago
Using relative units in image size and border-radius size can help ensure that your design remains responsive and adapts well to different screen sizes and devices.
For image size, it's recommended to use percentage values (e.g. width: 100%;) or viewport units (e.g. width: 50vw;) instead of fixed pixel values. This allows the image to scale proportionally to its container and adapt to different screen sizes without distorting or overflowing.
For border-radius size, it's also recommended to use relative units such as em or percentage values (e.g. border-radius: 50%;) instead of fixed pixel values. This allows the border-radius to scale proportionally with the element it's applied to, ensuring that it looks consistent and visually pleasing across different screen sizes and devices.
Marked as helpful1@kayyrbeksPosted over 1 year ago@RickHalmoguera Thanks for complete feedback! And now I understand it 🙂
0 - @iceberg61Posted over 1 year ago
Definitely Using relative units in image size and border-radius helps your design remain responsive on any sceen sizes
1@kayyrbeksPosted over 1 year ago@iceberg61 Thanks for your feedback! ( ̄︶ ̄)↗ It's really useful advice.
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