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

Responsive layout mix of Grid and Flexbox

Ben•300
@vBenTec
A solution to the Loopstudios landing page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Please, if somebody has a tipp for me how I could have solved the problem for the nav toggle menu to take up the entire width and height of the screen?

My approach I set up a black background for the whole page connect it with a pseudo element and a checkbox (checked), which was building my solution for making the toggle nav bar (without JavaScript), but the problem I run into it was that my header had to be somehow applied as well to my checkbox with another command than this one ~, because this selector is only applicable for siblings. Thanks, if someone find time to read over it!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Emmilie Estabillo•5,600
    @emestabillo
    Posted about 4 years ago

    Hi BenChis, I'm not sure if I got your question, but were you looking for a way to make the mobile menu cover the entire screen? If so, I actually think you already answered your question :-) Try this on your ul:

        width: 100vw;
        height: 100vh;
        padding-top: 10%; (or whatever you prefer)
    

    My other thoughts:

    • For the header text, I would delete the span tag wrapping the word 'THAT'. Remove the margins and place the entire heading text inside the h1 and add a max-width so it would only stretch to a point.

    • The first section under the header has duplicate img tags, one used for mobile and another for desktop. Look into <img srcset> so that you are only using one tag. Here's an article

    • The social media icons need to be wrapped in an a tag since they usually lead the user to another page. There's also a huge shift when hovering on them. Use the same technique as you did on the top and footer navs with the pseudoelement ::after so that the underlines are positioned beforehand rather than adding padding to create space between them and the item hovered on.

    • The entire page might also need a max-width since it is expanding a little too much on larger screen widths.

    Hope this helps!

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.

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub