Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Product preview card component (use only HTML & CSS)

@kayyrbeks

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

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

@RickHalmoguera

Posted

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 helpful

1

@kayyrbeks

Posted

@RickHalmoguera Thanks for complete feedback! And now I understand it 🙂

0
Godstime 330

@iceberg61

Posted

Definitely Using relative units in image size and border-radius helps your design remain responsive on any sceen sizes

1

@kayyrbeks

Posted

@iceberg61 Thanks for your feedback! ( ̄︶ ̄)↗ It's really useful advice.

0
Godstime 330

@iceberg61

Posted

@kayyrbeks your welcome👌

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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