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

Responsive component using flexbox

#accessibility

@freakyjones

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


There are two things-

  1. making equal width boxes with CSS flexbox. 2. I find it hard to understand when to use em, rem and when to use px.

I would like to ask about the best practices for CSS units.

Community feedback

@superschooler

Posted

Hi ABHILASHPANDEY,

There’s a YouTuber named Kevin Powell who has awesome videos on all things CSS. Here’s one that explains the differences in px, em, and rem very well.

Basically, never use px. Use rem for font-sizes. Use em for padding and margins.

https://youtu.be/_-aDOAMmDHI

Marked as helpful

1

@freakyjones

Posted

@superschooler Thanks for the help buddy.

1

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