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

TayAki79โ€ข 160

@TayAki79

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 finally solved this challenge in two days. I'm gonna say this was a very tricky one at least for me as a CodeNewbie. But on the other hand it was fun to work on this challenge sind I learned a couple of things too. In the beginning I was fired up how fast I was by building the mark-up and styling the whole thing but guys the active state really frigging got me =D=D=D

It took me twice as long if not three times longer to solve the hover state issue than simply building the page.

But now I have it set and done and it's time to present it to you. As Always please leave a like or comment and don't hold yourself back if you have any valuable advice for me that brings me further on my coding journey. Appreciate it a lot.

Best regards, Aki aka AkraDEV

Community feedback

Glozsaโ€ข 180

@Glozsa

Posted

Hello there @TayAki79!

Just a quick observation, the overlay image when you hover the NFT should have a border-radius. and your <HTML> should have lang="en" inside of it.

Hope you find this helpful, happy codding and holidays :D

Marked as helpful

1

TayAki79โ€ข 160

@TayAki79

Posted

@Glozsa hi there ๐Ÿ™Œ

Yeah, Iโ€˜ll work this out. Thx, much appreciation ๐Ÿ™๐Ÿฝ

1
TayAki79โ€ข 160

@TayAki79

Posted

@Glozsa hi, alright. I fixed the border-radius issue. But I don't know what you mean I should have lang=en inside the html tag? It's already in there ('wondering!!!'). Can you please make a screenshot that it's not inserted? That would be nice! : - )

Best regards, AkraDEV

1
Glozsaโ€ข 180

@Glozsa

Posted

@TayAki79 sorry, got confused. I meant that instead of the H2 you have there, an h1 would be more appropriate. Sorry haha :D

1
TayAki79โ€ข 160

@TayAki79

Posted

@Glozsa ah alright! haha, but can you see the lang="en" value?

0
Glozsaโ€ข 180

@Glozsa

Posted

@TayAki79 yeah yeah, sorry you got that right

1
TayAki79โ€ข 160

@TayAki79

Posted

@Glozsa haha ok, thx man.

1
xyzeezโ€ข 550

@xyzeez

Posted

Hello @TayAki79, Nice work I really most say but there are few patches to make.

  • Your <body> should not have a height or width, this way it would maintain the device width. You could see that it stretches out when viewed with different device.

  • You're having the <header> used wrongly. In this challenge you do not need a header. The header tag is used to contain links for navigation between pages. See here for more on the header tag.

  • Use the <main> tag to contain all the card element. remove the header and use a <div> as replacement. In that <div>, have a <picture> to house the <img>.

Happy coding :)

Marked as helpful

1

TayAki79โ€ข 160

@TayAki79

Posted

@xyzeez hi. Appreciate your feedback a lot. Iโ€˜m at work right now but canโ€™t wait to apply what you recommend โ˜บ๏ธ๐Ÿ™๐Ÿฝ

0
TayAki79โ€ข 160

@TayAki79

Posted

@xyzeez Alright. I'm back home now. I changed the header-tag to a div-element as you say. The reason I put the hero-img in the css-file was because I didn't find any way how to keep it in the html-file and still can put the overlay on it. That's why I said it took me more time to style the hover state than actually building the page. But what I wanna try is to change the regarding elements into clickable elements. That was recommended by Grace on slack in the Frontend Mentor Channel.

Concerning the measurements in the body-element I just read an interesting article by Dave Gray of freeCodeCamp where he talks about best practice of applying width and height to a webpage. You can read it here.

What's your opinion on this?

Best regards, AkraDEV

0
xyzeezโ€ข 550

@xyzeez

Posted

@TayAki79 As regards the hover state of the image, you in the container that has the image, you can have another empty div below it like this:

<div class="container">
 <picture> //Here you have the image// </picture>
 <div> //Here is the empty div for the hover state// </div>
</div>

With this, you can use CSS to make the empty div cover the image by setting its position, width and height. See How

As regards the body height, I'm talking in respect to this challenge and the approach you've taking. We all learn in this process. Thank you!

1
TayAki79โ€ข 160

@TayAki79

Posted

@xyzeez Oh you mean, I can stack the img and overlay on one another. OK. I didn't new that "picture" is also an html element =D ! I will try this on my next challenge since my solution is still working well for now. But you got it right. There's so many ways to catch up on the same target and I'm still far from being a good and clean coder. That's why I appreciate all of your feedback so much and do my best to become a real pro in this game. So thank you and all of the others here.

If y'all want to, please hit me up on twitter, linkedIn etc.

Peace, Love and Code

1

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