Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
5
Comments
2
Genie 🧞‍♂️
@EugeneCarbado

All comments

  • Letícia Lima•50
    @itsleticia
    Submitted about 2 years ago

    Responsive Card Component

    #web-components
    1
    Genie 🧞‍♂️•100
    @EugeneCarbado
    Posted about 2 years ago

    Hi Leticia,

    I've had a look at your code and I'd like to offer some tips. Firstly I can see that as I expand my window your content box expands also. This is due to using vw to set the size. It would be better for you to find out the size of the content box, or even what you think the size should be then use px or rem values (1rem is equal to 16px. Or you can set it to what you like in the root). Using vw or vh can be tricky because as the user's window increases so will your element. In some cases, this could be useful, but for something like a product card this is something that should, in most cases, have a fixed height / width.

    You have used em values and this can be also tricky, as using em values will inherit the size of the div it is nested in. A better value to use is rem as it always refers to the value set in the root.

    I hope this feedback is useful.

    If you have any questions don't be afraid to reach out :)

  • Eni•180
    @EnidaShehu
    Submitted about 2 years ago

    Product Preview Card Component - Solution

    #bootstrap
    2
    Genie 🧞‍♂️•100
    @EugeneCarbado
    Posted about 2 years ago

    I would say you definitely need to set a fixed width and height for the container. That is why, looking at your preview site, the whole element keeps resizing. Setting the width and height with rem or px in mobile and then desktop would give the results you desire and stop it from resizing when you expand the window. Have a look at the design and see if you can figure out how much rem or px you will need :)

    Marked as helpful
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub