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 trialNancy Melucci
Courses Plus Student 36,143 PointsRemoving margin on all sides
For a code challenge....
Hello everyone -
It seems that nothing works
gallery {
margin:: 0;
}
have also tried: margin: 0, 0,
margin: 0, auto;
margin: 0 0 0 0;
thanks
4 Answers
Dustin Matlock
33,856 PointsHi Nancy, you need to select the gallery
ID using the #
symbol in front like this:
#gallery {
margin: 0;
}
Luke Glazebrook
13,564 PointsThis should just be all you need.
gallery {
margin: 0;
}
Best of luck with the challenge.
Nancy Melucci
Courses Plus Student 36,143 PointsThanks for the fast response. That's what I've been coding but it comes back: "looks like at least one side has no margin. be sure set all sides to zero margin. Here's the whole task
gallery { margin: 0; padding:0; list-style: none;
}
Luke Glazebrook
13,564 PointsNo problem. Please could you paste the question into here for me to take a look at?
It should be working so I'm confused as to why it's not.
nharox
2,145 PointsIs "gallery" a class or an ID? If it's a class, you have to put a . before gallery. If it's an ID, you have to use a #.
While it's not best practice, you could also try to use margin: 0 !important;
Dustin Matlock
33,856 PointsDustin Matlock
33,856 PointsNancy, I went ahead and fixed your code highlighting. Below is a animated image to help show how code highlighting works on the Treehouse forum. Let us know if there's anything else we can help with.