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

Responsive Intro section with dropdown navigation

accessibility
Mr Rabbit•1,020
@rabbitmaid
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


This project was quite difficult for me! I had problems making up the dropdown menu! What is the best way to go about this? Also with the header section, i had difficulties aligning the images and content as shown in the design image.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Elaine•11,360
    @elaineleung
    Posted almost 3 years ago

    Hi Agbortoko, this is a great attempt I think! It's not an easy challenge because there are so many things to put together, but you did well on the whole, even though there are some things you'll need to fix.

    Firstly, I would not put the hero image and text under header; they should be part of the main tag since they are the contents of the website, and right now you have some accessibility issues in your report because you don't have a main tag. I would only put the logo and the nav/login elements in the `header.

    About how to position the hero image and the text content, I used display: flex with justify-content: space-between. You can try that and see whether that helps.

    Lastly, for the dropdown navs, you can check out the CodePen I made as a draft/practice for this challenge, and see whether that gives you some ideas on how to make your dropdowns: https://codepen.io/elaineleung/pen/OJvaWNz

    Complete version here: https://codepen.io/elaineleung/pen/poLpzge

    Marked as helpful
  • Afolarin Oyeleke•130
    @Fola-rin
    Posted almost 3 years ago

    Hello there, I checked your solution and it was really nice. I'd say how you went about the dropdown menu works unless you mean making it animated. If so you can easily set this to your dropdown .hide { height: 0; transition: 200ms ease; overflow: hidden; } .show { height: $dropdown-height transition: 200ms ease; } This solution works best when you have a defined height, which in your case you can easily get the height by inspecting your dropdown. I also noticed you do not have an overlay background when one opens the mobile menu. I feel having an overlay improves the user experience and also you can make it clickable as well. This can be done by having a .bg class.

    <div class="bg" onclick={closeModal}></div> .bg { position: fixed; height: 100%; width: 100%; top: 0; left: 0; z-index: 1; } and then you can easily add this to your mobile-menu .mobile-menu{ z-index: 2; // all your other styles }

    Any ways I really liked your work. Well done. Hope I was able to help?

    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
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 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