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

P

@CSE-Kyle

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?

I'm happy that I was able to get the design to look good with the mobile first approach.

What I would do differently next time is to set mobile first design to be the default design.

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

The hardest part for me was figuring out how to switch between image sizes based on either desktop or mobile design.

I had to reach out to the frontend mentor community for help and also look at others code on how they did it to get an idea how it should be done.

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

In the design, the desktop design still doesn't look accurate.

I'm having trouble with the right side of the card component to resonate with how the final design should look like, I still need some help with that.

Please do look over the code in my repository and the live URL and provide me any feedback with how I can improve this project, thank you.

Community feedback

David S 150

@davsanter1

Posted

Hello, your design looks great!

The reason of the problem with the right side is that you set the width of the "div img-container" to 100%, instead of 50%, but not only that, there is not width for the "div info" so it makes the right side to take as much space as it wants, to fix that set width on both divs to 50% so they "understand" they should share the container.

Also I would add a padding to the "div info" to make it look closer to the challenge desing.

Your code corrected should look like this:

img-container {
    background-image: url(/images/image-product-desktop.jpg);
    background-position: center;
    background-size: cover;
    width: 50%;
    height: 28.125rem;
    z-index: 1;
}

.info {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 50%;
    padding: 2em;
}

Hope it helps!

Marked as helpful

1

P

@CSE-Kyle

Posted

@davsanter1 I appreciate your feedback, thank you!

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