Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
59
Comments
1
Anna
@annaindistress

All comments

  • Ubaka•130
    @Ngeneubaka
    Submitted over 2 years ago

    Product Preview Card Component using HTML5 CSS3

    2
    Anna•1,070
    @annaindistress
    Posted over 2 years ago

    I would advise you to add a border-radius to the container element. This will make it easier to find and change this value in one place if, for some reason in the future, it needs to be changed.

    .container {
        border-radius: 0.625rem;
        overflow: hidden; /* this hides image corners */
    }
    

    I also wanted to suggest taking another look at using the article tag for just the container element. According to its specifications, it's meant to represent content that can be taken from this page and placed somewhere else without losing its meaning. So, while the whole card could be an article, it might be better to use div for each individual part

    Marked as helpful
Frontend Mentor logo

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub