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-main

@LeowWeiLee

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


What are you most proud of, and what would you do differently next time?

CSS coding with root section and also using of unit REM instead.

Did not realize have image for the mobile version and studied how to process the image for cut off instead of having the image stretching.

What challenges did you encounter, and how did you overcome them?

Using Goggle for searching on how to write the CSS for certain requirements.

What specific areas of your project would you like help with?

CSS coding and HTML coding standards. Right now still fine tuning and to trying to coding more neat and efficiently.

Community feedback

Da 360

@DaTheDumbGuy

Posted

Try adding width: 50%;. This sets the image width relative to the container, preventing the image from stretching the container.

.product-image {
   border-radius: 0.8rem 0rem 0rem 0.8rem;
   resize: both;
   width: 50%;
} 
I hope this helps, cheers (ノ◕ヮ◕)ノ*:・゚✧

Marked as helpful

0

@LeowWeiLee

Posted

@DaTheDumbGuy

Any idea why google chrome and fire fox behave differently?

Fire fox without this line, is working fine, while Google Chrome image get streched?

"width: 50%;"

1
Da 360

@DaTheDumbGuy

Posted

@LeowWeiLee It works fine when I tried both browsers, you probably fixed it.

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