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

product-preview-card-component using basic html and css

kwokkw 80

@kwokkw

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


.visually-hidden was the most difficult part of this project. I am not quite sure how part of the code below works. Any help will be greatly appreciated.


.visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0); 
  clip-path: inset(50%);

  /* Shrink an element into a 1px square */
  width: 1px;
  height: 1px;

  /* Hiding any overflow */
  overflow: hidden;

  /* absolutely positioning the element to remove any trace of it from the normal document flow. */
  position: absolute;

  white-space: nowrap; 
}

Community feedback

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