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

asekabtw 290

@asekabtw

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


Should I set a fixed width to sections?

Community feedback

@LisandraFerraz

Posted

If your question is related to the width size that changes due to the flex display set, depending on how you coded, so no. You don't need to set it as fixed for each div where you are putting your content on. You just need to define a width value to each section (as you already did) and perhaps try setting the whole card width value as 'fit-content', so it'll adjust according to the width size of each section you have. Remember to also set a width to the text section as well in order to have your card size set as preferred.

Though, the way your solution was developed works just well and there is no need to make it fixed nor to change anything, imo. :)

Marked as helpful

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