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 trialLuke Svarc
1,338 PointsSet all sides to zero margin
Hi guys,
I am currently on the quiz where it asks to select the ID Gallery and remove margin, padding and bullet points.
I'm struggling to see where my code is wrong, can anyone offer any advice?
Thanks
a {
text-decoration: none;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
}
#logo {
text-align: center;
margin: 0;
}
h1, h2 {
color: #fff;
}
nav a {
color: #fff;
}
nav a:hover {
color: #32673f;
}
h1 {
font-family: Changa One, sans-serif;
font-size: 1.75em;
font-weight: normal;
}
img {
max-width: 100%
}
gallery {
margin: 0;
padding: 0;
list-style: none;
}
Luke Svarc
1,338 PointsIn this code I realised the max-width: 100% is missing the ; I have added this now and still no luck
3 Answers
Haydn Ellen
Python Development Techdegree Student 22,243 PointsYou don't appear to have set gallery as a class, it should be .gallery (with a . in front of it). So the code would be:
.gallery { margin: 0; padding: 0; list-style: none; }
You just need to remember . goes before a class, # goes before an id and all is good :).
Haydn Ellen
Python Development Techdegree Student 22,243 PointsSorry, gallery is an id, not a class, so it should be: #gallery, apologies.
Luke Svarc
1,338 PointsThanks Haydn,
Very infuriating but I will try to remember in the future!
Thanks for your help.
Luke Svarc
1,338 PointsLuke Svarc
1,338 PointsIn this code I realised the max-width: 100% is missing the ; I have added this now and still no luck