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

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

Ryan Malkmus
Ryan Malkmus
2,053 Points

bug in code challenge???

@media screen and (min-width: 480px) {
  #gallery li {
    width: 28.3333%;
  }
}

this is my code, not sure how it will look once it's posted. I'm pretty sure i didn't do the markdown right. anyway, they ask me to make the gallery width 28.3333% when the browser is 480px or larger. Why won't it let me move on? is this a bug? :(

I got the Markdown for you. :D Just for future reference on posting code, check out this forum post.

8 Answers

Ryan Malkmus
Ryan Malkmus
2,053 Points

oh my gosh, i realized what I was doing wrong. I was just saying #gallery, NOT #gallery li. Sorry all for being a bone head :( my bad. Thanks for helping.

You originally had extra 3's. As I remember it, you had the selector correct and it was the extra 3's that were causing it not to pass.

Hi Ryan M,

There's already a media query set up at the bottom for you to put the styles in. Did you put it there or did you create a new media query at the top? This won't work because the width will be set back to 45% further down in the css.

Ryan Malkmus
Ryan Malkmus
2,053 Points

Hey Jason, what does the MOD beside your name mean?

Anyone with a MOD next to their name is a moderator on the forums.

You have eight 3's in 28.33333333%; the challenge says to only have four. Could that be the issue?

Ryan Malkmus
Ryan Malkmus
2,053 Points

i tried to only put four 3's instead of eight 3's. still says the same thing

It is the extra 3's as Ryan and Jeff have pointed out. If you have it at the bottom and with the correct number of 3's then I would refresh the challenge and try again.

Ryan,

If your using the code you posted you have too many 3's. Try 28.3333%.

Jeff

Ryan Malkmus
Ryan Malkmus
2,053 Points

still now luck after changing the number of 3's :(.

Ryan Malkmus
Ryan Malkmus
2,053 Points

it worked! thank you all! i do not know what it was. I copy and pasted the code above in this post. It looks like it's exactly the same as what i've been typing.

Did it ask you to select the gallery itself, or did it ask for elements inside the gallery?

EDIT: It passed for me. Are you using the query they've started for you at the bottom? Or are you making a new one at the top?

Ryan Malkmus
Ryan Malkmus
2,053 Points

thanks for getting that markup fixed for me. I see now how you did that now. this is the message it gives me when it fails....

Bummer! Be sure to set the width of gallery list items to 28.3333% when the browser is wider than 480px.

Ryan Malkmus
Ryan Malkmus
2,053 Points

Hey Jason, i put it in the existing media query that was on the bottom of the code.