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

CSS FLEX

react
Shekinah•140
@Shekinah007
A solution to the Intro section with dropdown navigation challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Getting the image size right and scale correctly for different screen sizes was kind of annoying. Wasn't expecting that.

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • Daniel•170
    @Catalyst497
    Posted about 3 years ago

    Wow, I love this solution.

    I just think if you were using flexbox for your navbar. You could add an align-items: center to it to make the items vertically centered.

    You can find my solution here: https://www.frontendmentor.io/solutions/flexbox-plenty-of-grid-layout-_rQIc3AANQ

    Marked as helpful
  • Tesla_Ambassador•3,070
    @tesla-ambassador
    Posted about 3 years ago

    Hey Shekinah007. Congrats on completing this wonderful solution. I really like how responsive it is and the exit animations of the desktop nav at a significantly smaller screen width! It's really great! A few things you might want to consider:

    • I'd suggest that you add some padding a top your nav bar because it's a little too close to the edge. You might also want to trigger the drop down menu with a click but in the case of having to trigger it with hover, you should keep the drop down menu such that it doesn't disappear when a user hovers away from the link that triggered it. It'd be great if it disappears when you click one of the sub-links. Because you are using REACT I suggest that you use the onMouseEnter event to conditionally render the drop down menu and then a click event on one of the liks to change the conditions to false and stop rendering the element.
    • Inorder to fix some of your accessibility issues, you might want to add landmarks (<main>, <footer> etc.) to your page so that the browser can easily navigate your site. If you want to know more on landmarks, follow this link.
    • You should consider using divs as parent elements of ul or another div as a parent element of another div because it's not valid HTML for span to be a parent to any of those. This will fix your HTML validation issues. Happy coding and keep up the good work, you're doing really great!
    Marked as helpful

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

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 all CSS, SCSS and Less files in your repository.

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.

How does the JavaScript validation report work?

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

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

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