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 trialAndre Maia
3,626 PointsHelp with a Challenge.
For this task it asks me to : "Inside the media query, select the list items inside the gallery and add a width of 28.3333%."
so at the top I type:
@media screen and (min-width: 480px) { #gallery li { width: 28.3333% } }
and it says that i am wrong. Can anyone help me out?
5 Answers
Andre Maia
3,626 PointsI should of searched the forums before hand:
https://teamtreehouse.com/forum/challenge-task-refactor-the-layout
It turns out that they had already written the "@media screen and (min-width: 480px) {}" at the bottom of the list.
one person said "respect the order of the lists..." I will have to check that from now on.
Thank you everyone for responding so quickly!
Erik McClintock
45,783 PointsAndre,
In the code you wrote above, the first thing I'm noticing is that you don't have a semi-colon after your percentage value.
Try that and see if it works.
Erik
Andre Maia
3,626 PointsThank you for that, there should for sure be a ; there.
Benjamin Noack
8,079 PointsThe width declaration does not need to be in brackets.
Benjamin Noack
8,079 Pointsnevermind....
Erik McClintock
45,783 PointsIt's a little confusing when written like this, but the curly braces that he has around the width declaration are actually correct and necessary. If you write it out in the more familiar way...
@media screen and (min-width: 480px) {
#gallery li {
width: 28.3333%;
}
}
...it's easier to recognize.
:)
Erik
Andre Maia
3,626 PointsI should of searched the forums before hand:
https://teamtreehouse.com/forum/challenge-task-refactor-the-layout
It turns out that they had already written the "@media screen and (min-width: 480px) {}" at the bottom of the list.
one person said "respect the order of the lists..." I will have to check that from now on.
Thank you everyone for responding so quickly!
Nurul Ahsan
2,039 PointsYes, i recover the answer.
@media screen and (min-width:480px){
#gallery li{
max-width: 28.3333%;
}
}
Nurul Ahsan
2,039 PointsNurul Ahsan
2,039 Points@media screen and (min-width:480px){ #gallery li{
max-width: 28.3333%;
}
}