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

NFT preview card component with HTML and CSS

Azzumar 340

@Azzumarithm

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


I appreciate any feedback. So far, I have difficulty on how to make the shadow behind the nft card. I already tried using box shadow and drop shadow. I could probably create another div and place it behind another nft-container div.

Community feedback

WandoCode 840

@Wandole

Posted

Hey,

To add the shaddow behind the picture, you can use the ':before' on your div.image (not on the img itself since the tag can't have it).

You put 'inset: 0' (shorthand for 'bottom', 'top', 'right', 'left') as property in the 'before' element and set a background color with opacity <1.0.

If you never used ':before', got check how it work before! (You will need to set a content and the 'position' property if you want it to works).

Otherwise, you can, as you said, create another div to make the shaddow. You place it inside of your div.image container and, as for ':before', you use a 'position:absolute' on it with 'inset:0' and a background with opacity.

I hope it will help you!

Marked as helpful

1

Azzumar 340

@Azzumarithm

Posted

@Wandole thanks for the help

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