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

@catherineisonline

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


Hello, Frontend Mentor community! This is my solution to the NFT preview card component.

I have read all the feedback on this project and improved my code. Due to the fact that I published this project very long ago, I am no longer updating it and changing its status to Public Archive on my Github.

You are free to download or use the code for reference in your projects, but I no longer update it or accept any feedback.

Thank you

Community feedback

Travolgi 🍕 31,460

@denielden

Posted

Hi Catherine, very good job!

I see that in the :hover state of the image the eye is not at full opacity.

To solve you could insert the eye through an img tag centering it through flexbox inside the div with class .color-image and making it visible only in the :hover state.

After, in .color-image you have to remove opacity and put the color through rgba:

background-color: rgba (0, 255, 247, .5);

Happy coding :)

Marked as helpful

0

Travolgi 🍕 31,460

@denielden

Posted

@catherineisonline You are welcome! And don't forget to mark my comment as helpful ;)

Thank you and Happy coding :)

0
Byron 2,250

@byronbyron

Posted

Looks really good!

Might need a border-radius and overflow: hidden on the image to get the rounded corners, especially when hovering over it.

/** Container Image **/
.container-image {
  position: relative;
  cursor: pointer;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  overflow: hidden;
}

Also, if you give the image a display: block;, it should get rid of the slight lip of space below the image, which is noticeable on hover.

.main-image {
    position: relative;
    height: auto;
    width: 100%;
    border-radius: 5px;
    display: block;
}

Nice job 👍

1

Olli1989 80

@Olli1989

Posted

Hello,

a hover transition would be nice, it would be much smoother.

At the smallest size of the browser you have side scrolling.

If you resize the browser you are jumping between sizes, thats because of your media querries.

Besides these small things it looks great.

I hope i could help.

1

Prithvi 110

@Prithvi12890

Posted

Hello Catherine!

The styling looks amazing and the comments in your CSS & HTML file make it easier to read and understand too. The transition is smooth too.

A small suggestion to match the design, even more, you can try changing the hover state of the card's image as below to match with the active state design: .color-image:hover { background-color: var(--cyan); opacity: 0.5; } to .color-image:hover { background-color: hsla(178, 100%, 50%,0.5); opacity: 1; }

i.e., instead of giving the whole hover thing an opacity of 0.5, we can give just the background an opacity of 0.5 using hsla() for cyan color so that the eye-svg does not get that opacity and its true color is shown.

And even, changing the font-weight of the card title to 600, card description, and time left to 300 if you are particular about matching the design weights 😄

The whole card style looks amazing and even your way of writing the HTML and CSS (with comments, and proper indentations) is really good and easily understandable.

Great Styling!

0

@catherineisonline

Posted

@Prithvi12890 Noticed a little bit late but thank you for your time anyway!

0
P

@iamindika

Posted

I just finished this challenge myself. Playing with the background properties to overlay images and your use of css custom properties was pretty cool. Can't wait to try them out myself! Keep at it!

0

lcs7r 10

@Lcs7r

Posted

Hi, good job ! Just a little tip, put "transition: background-color ease-in-out 0.3s;" not on the "color-image:hover" element but direclty into ".color-image". The transition when you take off your mouse of the image would be better.

0

Ess-kay 10

@shahidkhan6

Posted

It took me almost 2 hours to fix the same issue that u have here . Issue: the view-icon fades with hover effect! solve it by changing overlay opacity to 1 instead of half(or whatever u used), and search for how to give it a half opacity background on hover :)

0

P
Jay 260

@Hyuuga81

Posted

Nice job. I really like that transition on mouseover. It really makes it better to look at. I may borrow that :). Keep it up.

0

@Julian17xd

Posted

Hola, estoy realizando este desafío pero no he podido avanzar porqué no sé como sobreponer la imagen "view" sobre la imagen "equilibrium" al momento de hacer hover sobre la imagen. Te agradecería si me recomiendas algún vídeo el cual de solución a mi problema, no importa si el vídeo está en inglés. Gracias

0

@catherineisonline

Posted

@Julian17xd Hola, no conozco ningún video para recomendarte. Puedes revisar mi código en Github y usarlo como ejemplo

0

@Julian17xd

Posted

@catherineisonline Gracias, haré lo que dijiste

0

@intherightdirection

Posted

Hi, Looks good. Just a little confused by your width changes in the media queries. Would a 'max-width' do what you are looking for? Seems like you want to manage the width at different screen sizes. With max-width you wouldn't need to write a bunch of media queries to overwrite each other.

0

@catherineisonline

Posted

@intherightdirection didn't really try that way :D Thank you for the feedback, definitely going to try that way

0
vishwa3 250

@vishwa3

Posted

Found your solution a bit easy to understand compared to others , referred your solution to implement hover state for image

0

@mishrahat

Posted

That's great! You also skipped the background part of the card as I did. It's really subtle. Good work.

0

codezeloss 570

@codezeloss

Posted

Hello Catherine !! There just a need to add some small details in your code, especially in green part(eth sold) & deadline time. Which is [align-items] declaration, in order to have elements aligned in the same line as there icons. Have a nice day, good luck in your Dev journey.

0

@MuhammadM1998

Posted

Good job catheriene. the container-details div need less margin-bottom and the overlay need to be a little lighter but it looks great. I noticed that your report has 0 issues and I always have issues such as the html should include the lang = "en" although I do have it in my code, I hope you can help me with this.

0

@catherineisonline

Posted

@MuhammadM1998 Thank you for the feedback. I didn't try to solve that issue yet as I also had it in my very first projects. It looks like some kind of bug. When I started solving other issues in my next project the language one disappeared itself. I didn't change anything regarding this.

0

@MuhammadM1998

Posted

@catherineisonline Thanks for replying. I guess I'll have to wait for it to disappear on it's own too. Good luck and keep up.

0

@MuhammadM1998

Posted

@catherineisonline Checked out my last challenge and indeed all the fake problems disappeared. I had only one problem which did really exist after checking my code. Thanks again.

0

@catherineisonline

Posted

@MuhammadM1998 yes, I was looking into it just now and I had an issue with choosing the right heading but in the description, it showed me a language issue. Just read the title of the problem so it makes more sense

0

@MuhammadM1998

Posted

@catherineisonline yeah will do that fron now on

0

@Kamasah-Dickson

Posted

The color of the overlay is very deep make it light, I mean change the opacity. Good Job!

0

@gccavalheiro

Posted

Good work! a fine tuning tip if you want to do it...

in your <div class="container-image"> add the following properties in css: border-radius: 5px;, overflow: hidden; and line-height: 0;

you can remove the "border-radius" from your tag <img class="main-image" />

the code I indicated will make the children respect the format of the parent div(container-image) with this both its overlay and the image have rounded edges, the "line-height" will make its image and its overlay have a better framing, thus removing that difference in sizes that is at the bottom, "a small space"

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