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 NFT Preview Card with CSS Flexbox and Media queries

Clinton 100

@eghosaclinton

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


No questions.

However, If you have better ways/ ideas to approach Responsive Design as well as CSS best practices, feel free to tell.

Community feedback

Bryan Li 3,550

@Zy8712

Posted

Your site looks pretty good. Main things I think you should add/modify are:

  • adding a <main> tag around your page contents for accessbility purposes
  • alt tags are not necessary for images that are mainly for decorative purposes
  • adjusting your hover effect so the icon is at the middle and the cyan overlay doesn't exceed the image.

How I did the hover effect was something along the lines of this:

For the HTML:

<div class="image-div">
   <img src="./images/image-equilibrium.jpg">
   <div class="curtain"></div>
   <img src="./images/icon-view.svg" alt="" class="curtain-icon">
</div>

For the CSS:

.image-div img {
   max-width: 100%;
   height: auto;
   display: block;
}

.curtain {
   background-color: var(--Cyan);
   width: 100%;
   height: 100%;
   position: absolute;
   opacity: 0%;
   transition: opacity 0.25s;
}

.img-div:hover .curtain {
   opacity: 50%;
}

.curtain-icon {
   position: absolute;
   inset: 0;
   margin: auto;
   opacity: 0%;
   transition: opacity 0.25s;
}

.img-container:hover > a > .view-img {
   opacity: 100%;
}

Hope you find this feedback useful 👍

1

Clinton 100

@eghosaclinton

Posted

@Zy8712 Thank you very much!! This is awesome...thanks for the tips as well!

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