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

Loopstudios landing page solution

#accessibility#react#tailwind-css#vite
Adelβ€’ 820

@Adel-Harrat

Desktop design screenshot for the Loopstudios landing page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


I had difficulty with creating that border bottom effect when hovering 😭

I did it with after: pseudo element but still I felt like my solution to this issue is somehow not right, if anyone can help .. I would appreciate that a lot (NB: I'm using tailwindcss)

Community feedback

Christianβ€’ 970

@FLCHRIS

Posted

Hi there! ✌️ Congrats on completing this challenge πŸ₯³πŸŽ‰

Answering your question, your solution is good, but as you commented, it can be improved a bit and by removing some tags from your code.

This is a way of how I would animate the menu, using only TailwindCSS.

<ul className={`flex items-center gap-5`}>
{items.map((item) => (
<li key={item.id}>
<a
href={item.link}
className={`group relative block text-center text-tw-white after:content-[''] after:absolute after:bg-white after:bottom-0 after:left-0 after:h-[2px] after:w-0 hover:after:w-full after:transition-all`}
>
{item.text}
</a>
</li>
))}
</ul>

As you can see, I removed the span tag and just used the after pseudo-element.

I hope I have helped you, and solved your problem. πŸ™ƒ

All the best, Christian.

Happy coding! ✌️

Marked as helpful

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