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 trialBen Mair
8,728 Pointsgallery margin removal
I cannot figure out what I am doing wrong it keeps telling me that one side has no margins but need to fix the other side. I have done margin: 0; margin: 0 none; margin: 0 auto; margin: 0%;
I guess I just can't figure it out.
a {
text-decoration: none;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
}
#logo {
text-align: center;
margin: 0;
}
img {
max-width: 100%;
}
#gallery {
margin:0 none;
padding:0%;
text-decoration:none;
}
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;
}
1 Answer
Chris Shaw
26,676 PointsHi Ben,
You're almost there, the correct way to set the margin
so it's zero on all sides is margin: 0
, values for this and the padding
property have to be numbers of the unit types px
, em
, rem
, %
etc. The other problem is you've used the text-decoration
property instead of the list-style
property to remove the bullets from the LI
elements for #gallery
.
The selector you should have is the following, whether is not we specify a unit type.
#gallery {
margin: 0;
padding: 0;
list-style: none;
}
Happy coding!