Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Animated Hamburger Menu

Question about the CSS and the active class

In the video at the end to have the X displayed when the right side is displayed. He removed the active class from the hamburger div in the index file. Does that mean you can remove it from the CSS sheet as well since it is no longer used at in the code. Was the active class used just to see and test the X and transitioning.

1 Answer

Steven Parker
Steven Parker
231,248 Points

The "active" class is still used because it is applied when you click on the menu symbol. It must remain in the CSS for the animation to work.

His change just means it is not applied by default when the page first loads.