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

@jeff-dev0

Desktop design screenshot for the Intro section with dropdown navigation coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hey everybody, I was wondering how did you control the submenu and arrows, I toggled a clicked class to the element and made a condition that if the element has clicked the clicked class shows the submenu and arrow down and else do not, how did you handle it?

Community feedback

Dipu 430

@immdipu

Posted

if you are using class to set the display properties none and then change it block or flex when clicked on the submenu may be thats the reason if you can make it look smooth and can't add animation because when you set display none you are literally deleting the html element and you can't animate that . so if you wanna animate like you want to submenu to slide down from top or something then what you can do is don't change the display properties instead set the position absolute and change the top value such that it goes up outside of the page hence it won't show up and when the user click on the button change the top properties to 0 or something that makes it slides down. same with arrow you can transform rotate to rotate the arrow like rotate it 180deg or 90 deg when the button is clicked. i hope it helps you. best of luck

0

@jeff-dev0

Posted

@immdipu you are right but the challenge provides us with pictures so its better to use pictures

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