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 product page using html and css

Hicham Maachouβ€’ 40

@hichammaachou

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


hello, this is my first time trying a challenge here was a little difficult. any feedback is welcomed and thank you.

Community feedback

Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

πŸ‘ΎHello Hicham Maachou, congratulations for your first solution! πŸ‘‹ Welcome to the Frontend Mentor Coding Community!

I did some fixes to your code:

The correct size for the container is max-width: 900px(to have the correct size and also make it responsive)

.product-container {
    background-color: hsl(0, 0%, 100%);
    border-radius: 10px;
    /* height: 70%; */
    max-width: 900px;
    /* width: 60%; */
    overflow: hidden;
    display: flex;
    justify-content: space-between;
}

Note that there's no need to use height here, because since you set a height for an element, this means that this element will grow until a certain point and after that the inner content (as texts or images) will start to pop out the element due its fixed height, so isn't necessary to set the height the container height comes from the elements, its paddings and height.

✌️ I hope this helps you and happy coding!

Marked as helpful

1

Hicham Maachouβ€’ 40

@hichammaachou

Posted

@correlucas thank you sm that was really helpful!

1
Adrianoβ€’ 34,090

@AdrianoEscarabote

Posted

Hello @hichammaachou, how are you?

Welcome to the front-end mentor community. I really liked the result of your project, you did a great job in this challenge, but I have some tips that I think you will like:

1- Document should have one main landmark, you could have put everything inside the main tag click here

I noticed that the container was growing due to the relative measurement units, always try to use fixed measurement units at higher resolutions, and you can make the change using an emdia query for the relative measurement unit, which is better at lower resolutions.

.product-container { height: 500px; width: 700px; }

The rest is great! Hope it helps... πŸ‘

Marked as helpful

1

Hicham Maachouβ€’ 40

@hichammaachou

Posted

@AdrianoEscarabote thank you so much for feedback, very helpful!

0
Adrianoβ€’ 34,090

@AdrianoEscarabote

Posted

@hichammaachou no problem man, keep coding πŸ‘

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