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

@CodeXsubham

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


Can someone correct my mistake ...when i was trying to position logo of eth and clock just beside stats and timing ...its was not coming just beside them.

Community feedback

Josh 320

@Ao-chi

Posted

Hi! I looked on to your solution using the browser's dev tools and I find that you assigned display: inline-block to your parent div small-eth and days. The display property is not inherited by its children that's why the icon and text doesn't go side-by-side.

To fix that you can add the display: inline-block to your child elements like this:

.small-eth p,
.days p {
    display: inline-block;
}

and you could reduce the padding on the .days p { padding: 95px } to .days { padding-left: 67px px;} .

Hope this helps~

Marked as helpful

0
Vicktor 900

@Victor-Nyagudi

Posted

Hello, Subham.

This is a good attempt.

To align the logos with the text, try using display: flex; on .small-eth instead of display: inline-block;.

This makes the logo and eth text flex items that will be positioned side by side. You can then use the gap property or add a margin to one of the flex items to increase/decrease the space between them.

Here's a sample of what the code could look like.

.small-eth {
   display: flex;
   justify-content: flex-start;
   align-items: center;
   gap: 0.75em;
}

The same can be repeated for the clock icon and the text.

Here's a helpful article on flexbox if you're still confused about how to use it.

Try it, and let me know how it goes.

I hope this helps.

1

eldoragon 40

@eldoragon

Posted

@Victor-Nyagudi may i know how to get rid of the scrollbar in nft desktop version?

0
Vicktor 900

@Victor-Nyagudi

Posted

@eldoragon

Changing the overflow property to hidden or visible removes the scrollbar, but this depends on whether you want the extra content flowing out of the container to be seen or not.

Here's a helpful article on scrollbars and overflow that will give you a better understanding of the concept.

Hope this helps.

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