Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 11 months ago

Product Preview Card using Tailwind CSS

tailwind-css, parcel
P
Jaylen Baxter•360
@JYLN
A solution to the Product preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I normally rely on the Figma design file to nail the spacing between elements, but this time without it provided I had to use my best judgment. I believe I did well with the spacing between elements and it looks fairly close to the design.

I also learned about the picture and source element from the web.dev resource, and I will continue using it for other projects.

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

At the custom breakpoint I had set, I noticed that once the layout shifted, that there was a strange gap under the image for the first couple of pixels past the breakpoint before it grew. I noticed it seemed to be due to the text wrapping at the point of the breakpoint. I decided to use the breakpoint to decrease the amount of padding once the layout shifted and it didn't produce the gap between the image and the bottom of the card.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Jaylen Baxter's solution.

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

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