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

Intro section with dropdown, React

#react
Joel 590

@JoelLH

Desktop design screenshot for the Intro section with dropdown navigation coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


First time doing dropdown menus The hardest part was being able to display the nav correctly. My cody is not super clean tho. Any feedback is welcome, thank u!

Community feedback

Elaine 11,420

@elaineleung

Posted

Hi Joel, this looks good! The mobile nav works, and the dropdowns also. I think you did well also in keeping the image and text containers at a good size and at optimal views.

Some other comments:

  1. I notice that at mobile view before the breakpoint changes, the image becomes stretched out. You'll need to add an object-fit: contain, and that should fix it!

  2. For .hero at mobile view, you can try width: min(100%, 80rem) instead so that the text doesn't stretch out as much, and then at desktop view, you can either just use width: 100% or width: min(100%, 80rem) so that things don't stretch out too far here. If you use min(), be sure also to add margin-inline: auto.

  3. For the React side, I think you can try making a component for the links since they appear quite repetitive, and they can practically can be made into a component.

That's about it, great work since it is not easy to make this look good!

Marked as helpful

3
Md5 dalton 1,430

@md5dalton

Posted

Hello Joel. Congrats on finishing the challenge.

A few of suggestions in your styling would be to :

  • Remove the height on .hero-img selector so that image can be displayed in correctly through different viewports.

  • Add z-index greater than 0 on your .dropdown selector to elevate it obove main content:

.dropdown {
     z-index: 1;
}

Marked as helpful

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