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-card-preview

@EFS1008

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Francisco Carrilloβ€’ 5,540

@frank-itachi

Posted

Hello there πŸ‘‹. You did a good job!

I have some suggestions about your code that might interest you.

HTML πŸ“„:

  • The heading order is important in the html structure so try to always start your headings and/or titles with an <h1> tag and then you can increase by one if you need to use more headings in your html code. So replace the <h1>Eau De Parfum</h1> by the <h2> tag.
  • You could also use the <picture> tag that allows you to interchange the images depending of the viewport size. Red more about this awesome tag here
  • Put the <div class="attribution"> out of the <main> tag and wrap it inside the <footer>.

CSS🎨:

  • You can use grid or flexbox to center the content no matter the viewport size. Using grid you can do the following:
body {
min-height: 100vh;
display: grid;
align-items: center;
justify-content: center;
}

With flex:

body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
  • You can also use the text-transform: uppercase; property to make the perfume word appear in upper case even though you typed it lower cause in the HTML file.

I hope you find it useful! 😁😁 Above all, the solution you submitted is greatπŸ‘Œ!

Happy <coding /> 😎!

Marked as helpful

0

@EFS1008

Posted

@frank-itachi thank you so much for the help sir. :)

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