Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

NFT preview Card component with TailwindCss

tailwind-css, accessibility
Travolgi 🍕•31,300
@denielden
A solution to the NFT preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hi community :)

In this challenge I used tailwindcss for the first time.

Tailwind is very convenient but sometimes in the elements that need many classes I find the html too long and confusing.

What do you think about it?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Rogelio Delgado Montoro•120
    @RogFed
    Posted over 3 years ago

    I tend to avoid CSS Frameworks if possible to be honest, but they have their uses for sure. It is expected to have a bunch of html classes, not much can be done there. Do make use of prettier or some formatting tool to at least have the HTML presented in a way that is easier to read for you while you're coding.

    Have you used any other framweork? MaterialUI, Bootstrap. If so, what's your take on Tailwind vs those other alternatives.

    Keep rocking man, you have some nice solutions in the platform.

    Marked as helpful
  • Web Wizard•5,690
    @rsrclab
    Posted over 3 years ago

    Hi, @denielden ~

    Congratulate on your solution to the challenge on FM platform. I have studied your work carefully and learned a lot from it.

    Here are some of the tips I like to provide.

    1. First, answer to your question. Of course, Tailwind is a wonderful one, but as you can see it's too complicated for small tasks like this. So I suggest you to use pure style on this one. On bigger projects, Tailwind will become powerful weapon, but for this project, it's only time wasting.
    2. I hope you to add transition effects on heading and creator name.

    https://www.frontendmentor.io/solutions/my-first-solution-on-chanllenge-V-4IzAivH

    Here is my solution to this challenge, and if it can help you even a bit, it would be happy to me.

    Cheers ~

    Marked as helpful
  • Grace•32,130
    @grace-snow
    Posted about 3 years ago

    Hi

    Two really strange things on this that I definitely recommend you remove:

    • href="javascript:void(0) should not be on any of these anchor tags. There is no reason to be intercepting the anchor tags with js, just leave as a forward Slash or hash.
    • why are there title attributes on every anchor tag? They shouldn't be there. It's especially confusing for the image link, with all the many alts and titles in there I can't understand whats meant to happen on click via my screenreader (search engine bots would also be confused)

    What is it you expect to happen on click of that image, if this was real? Because it might be more appropriate for that one to be a button, all depends on intended behaviour

  • Aziz Najjar•260
    @Njoura7
    Posted about 3 years ago

    Hello, good job man , almost exactly the same pattern I came here trying to understand how did you make the eye totally visible but I didn't really understand since u used tailwinds and am still stuck in vanilla CSS xD, but I guess you used transition which a very good idea, I ll might try it, but I came across this '-webkit-"property":' and I ve ben searching about it and I didn't understand it well so I was wondering if you could explain it. Thank you

  • muhamad•360
    @noheezybucket
    Posted about 3 years ago

    Woaw nice, Tell me, how did you do to make your site as close as the design ??

  • dumbxguy•10
    @DumbxGuy
    Posted over 3 years ago

    hi @denielden you did a great job..

    can you help me? i am using image tag but its not working...

    can you help me out. :)

    thank you :)

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub