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 landing page using scss

#sass/scss
Shena• 150

@wshena

Desktop design screenshot for the Sunnyside agency landing page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


I have difficulty for hamburger menu on mobile, as you guys can see if you visit the website, i can open (click the hamburger) and then mobile links show up, but if you click it again, it won't close. If you have the solution for my problem, please teach me.

I also have difficulty with responsive wesbite

Community feedback

Nneoma Njoku• 1,210

@SatellitePeace

Posted

Hello @wshena your work looks great on mobile here is a tip for creating small screen menus

Instead of changing the heigth from negative to positive values why not set the menu container to display:none

add a new class in the css and set it to display:block then use if/else statement to Target the menu and to toggle the menu

Like this

CSS
slider{
display:none
}
.slider.show{
display:block
}

JS
function openAndCloseNav(){	// 
mainNavbar.addEventListener('click', () => {
	slider.classList.toggle(show)
});
}

openAndCloseNav()

If you want nice animations you can use transform property to achieve that instead of display:none

Doing it this way reduces your code a bit and gives you the same result

I hope this helps

Marked as helpful

0

Shena• 150

@wshena

Posted

@SatellitePeace Hi, thanks for your advice. I will definitely try to implement it in the next challenge. Thank you

1

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