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!

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

HTML How to Make a Website Responsive Web Design and Testing Refactor the Layout

Khadar Abdulahi
Khadar Abdulahi
1,955 Points

Menu is not working

The Click event not working on menu where its shows no error on the console but it doesn't preform its task don't know why help!!!! https://w.trhou.se/jxaslazq23

Hi khadar, The challenge was At the bottom of this CSS file is a media query. Inside the media query, create a selector that chooses all list items that are nested inside the element with the id of "gallery". Then, inside your newly written selector, set the width property to a value of 28.3333%.

couldn't see a media query at bottom of css file.

try writing a media query with min-width: 480px and select the li with parents id of "gallery" and set it to width:28.3333%..

2 Answers

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

Hi there, Khadar! For some reason, this question is linked to a challenge, but your question seems to be about your code in your workspace. You've correctly selected the element in question, but you're using nav.display. This should be nav.style.display.

You can find your corrected code below:

const menu =document.querySelector('#menu');
const nav =document.querySelector('#main_menu');
menu.addEventListener("click", ()=>{

When I do this, your button works! However, you will need to refresh the page and possibly even clear the browser cache to see the changes.

Hope this helps! :sparkles:

I am running into an error for this question. Here is my code but I am getting "Bummer!"

gallery li {

width: 28.333%; }