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

Responsive layout mix of Grid and Flexbox

Benβ€’ 300

@BenChis

Desktop design screenshot for the Loopstudios landing page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

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!

Community feedback

P
Emmilie Estabilloβ€’ 5,540

@emestabillo

Posted

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!

1

Benβ€’ 300

@BenChis

Posted

Hi Emilie,

Thank you so much for your time and help!

Sorry, I think I did not make my point clear. What I meant is for my navigation menu the mobile version should have a black background when somebody clicks the toggle menu. I could nearly apply all css-rules on my .nav-toggle-label , but there is a problem occurring with my .navigation (Code-line 29) that it is not getting black when it should be black. (It is the parent where my elements are nested)

I have only one solution so far that does not solve it completely:

  1. I could put a black background on my .navigation codeline29 would solve the problem for making the whole screen black, but I can not decide when I turn it off or on, or is there a function that I could use to tell specifically the browser turn this background on when somebody clicks the .nav-toggle-label?

I applied all your advice and my layout looks better designed thanks again!!

0

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