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

Insure Responsive Landing Page using CSS Flexbox

Stanislav Tiryoshin•60
@stanislavtiryoshin
A solution to the Insure landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Got some problems with z-index property. For some reason I can't make the mobile pattern sink under the heading and the button of the intro section (hero). You can see this by sizing the window to approximately 400px wide. Any advice? Thank you in advance.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted over 3 years ago

    Hey, great work on this one. Desktop layout looks great, just needed the hero-section image to be taller like on the design, the site is responsive and the mobile state looks really great.

    Ben already gave a feedback on this one, just going to add some suggestions as well:

    • The header should only be containing the topmost part of the layout, the website-logo, the navlinks. The hero-section downwards should be placed inside the main.
    • Since you are treating the website-logo as interactive ( putting cursor: pointer)m, it would be great to use a tag on it and treat as a real link. Website-logo-link a tag should have either aria-label attribute or sr-only text inside, that describes where the link would take the user. Usually, website-logo directs user to homepage so use homepage as the value like `aria-label="homepage".
    • Remember that a website-logo is one of the meaningful images on a site so use proper alt for it. Use the website's name as the value like alt="Insure".
    • Also, wrap the whole content of the .nav-row inside a nav or just simply change the .nav-row from using div to using nav since those will be your navigational links.
    • If you somehow use tab key on your keyboard to navigate and navigated on the view plans it is hard to tell where you are at right. It would be great to instead use the default outline of the :focus state of an element use a custom outline. For example:
    input:focus-visible {
      outline: 2px dashed red;
      outline-offset: 3px
    }
    

    This way, your site have its own customized outline as a visual indicator.

    • The hero-section image could have used a descriptive alt value since it is meaningful if you look at it as it is descriptive in content.
    • Those background-patterns could have been used as value in the background property on an element. This way, you won't have to create extra html tags for each of them.
    • view plans is more better to use a tag rather than button since it looks more of a link rather than a control for opening up like a modal.
    • Only have a single h1 on a site. It would be great to change those headings into something like h2.
    • Those 3 icons on the We’re different are not links, they are just simple an img tag which is hidden since those are decorative images and since you are using svg on them, use aria-hidden="true" attribute on the svg to hide them.

    FOOTER

    • Same with the company logo, use a more proper alt value.
    • Each a tag that wraps the social-media icon should have either aria-label attribute or sr-only text inside it, defining where the link would take them. For example, you should use facebook as the value if the link would take the user to facebook.
    • Social-media image should be hidden since it is only a decorative image so use aria-hidden="true".
    • For those 4 sets of links at the bottom, you could wrapped them in a single nav since those are still your website's navigational links and add an aria-label="footer" on the nav so that it will be unique.
    • Since those 4 sets are links, use a tag for each of those. Again, interactive components needs to use interactive elements.
    • A markup that you could use for those 4 sets could be this one:
    <nav aria-label="footer">
      <ul>
        <li>Our Company
          <ul>
            <li> <a href="">{link in here}</a></li>
            ....
            ...
          </ul>
        </li>
        <li>Help Me</li>
        <li>Contact</li>
        <li>Others</li>
      </ul>
    </nav>
    

    And so on, just use the first sample of the Our Company for the other list-heading.

    MOBILE

    • The hamburger button should have a default attribute of aria-expanded="false" and it will be set to true when the users toggles it and vice-versa.
    • The hamburger button should have either aria-label attribute or sr-only text inside it which defines what the button does. You could use aria-label="navigation dropdown menu"
    • The img inside the hamburger-menu should have been hidden since it is only a decorative image so add aria-hidden="true" on it.
    • Also, you don't need to create 2 button for each toggle. You could have just changed the background of each button based on their state. Showing the hamburger if it is not toggled and showing the X if it has been toggled.

    Aside from those, great job again on this one.

    Marked as helpful
  • Ben•770
    @BenConfig
    Posted over 3 years ago

    Hey, I tried this and it fixed the issue:

    .hero-content {
        isolation: isolate;
        z-index: 1;
    }
    
    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