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 Card using CSS

Omar Adelโ€ข 30

@OmarAdelAttia

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


Using the flexbox and remembering all its tricks was the real challenge beside the media query

Community feedback

@MelvinAguilar

Posted

Hi @OmarAdelAttia ๐Ÿ‘‹, good job completing this challenge, and welcome to the Frontend Mentor Community! ๐ŸŽ‰

I have some suggestions you might consider to improve your code:

  • Use the <main> tag to wrap all the main content in your solution instead of using <div class="product_card">.
  • Use <footer> instead of <div class="attribution">. The <footer> element contains authorship information.
  • Use an h1 tag for your solution. The <h1> element is the main heading on a webpage, also, there should only be one <h1> tag per page.
<h1 class="product_name">Gabrielle Essence Eau De Parfum</h1>
  • Always avoid skipping heading levels; Always start from <h1>, followed by <h2>, and so on up to <h6> (<h1>,<h2>,...,<h6>).
  • You can use a <picture> tag when you need to change an image in different viewports. Using this tag will prevent the browser from loading both images, saving bandwidth and preventing you from utilizing a media query to modify the image.

Example:

<picture>
   <source media="(max-width: 768px)" srcset="./assets/image-product-mobile.jpg">
   <img src="./assets/image-product-desktop.jpg" alt="your_alt_text">
</picture>

Above all, the project is done well๐Ÿ‘. I hope those tips will help you! ๐Ÿ‘

Good job, and happy coding! ๐Ÿ˜

1

Omar Adelโ€ข 30

@OmarAdelAttia

Posted

@MelvinAguilar thanks a lot, Melvin, I really appreciate your suggestions and will try to consider them next time :D

1

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