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 trialLesly Blaise
367 PointsPLease help me find errors in these codes
Hello, Please help me find errors in these lines of code.
Cheers
a {
text-decoration: none;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
}
img {
max-width:100%
}
#gallery {
margin:0;
padding:0;
list-style:none;
}
#gallery li {
float:left;
width:45%;
margin:2.5%;
color:#000000;
background-color:#ffffff;
}
#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;
}
3 Answers
Steven Parker
231,269 PointsI think when they ask for a "color of your choosing", they mean a "new color of your choosing". Black is the default, so setting it black makes it look like you didn't set it.
Choose a color other than the default (black).
Also, while not a problem this time, add new code after the provided code (unless directed otherwise).
Lesly Blaise
367 PointsThank you
Jacob Hieter
3,400 PointsHere is a couple of issues that I have found.
Your code reads,
img {
max-width:100%
It needs to look like this,
img {
max-width: 100%;
}
On the above statement you forgot to add a semicolon ";" at the end of the line. Also this is not really necessary but you have a lot of places where you forgot to add a space after the colons ":". Adding a space after to colons allows for easier readability.
Also in the h1 rule yours reads:
h1 {
font-family: Changa One, sans-serif;
font-size: 1.75em;
font-weight: normal;
}
It needs to look like this,
h1 {
font-family: 'Changa One', sans-serif;
font-size: 1.75em;
font-weight: normal;
}
Anytime you have a two word font family that is separated by a space you need to include it inside either single quotes ' ' or double quotes " ".
Another readability issue that I have found includes this one. your script reads,
}
#gallery {
margin:0;
padding:0;
list-style:none;
}
For better readability on your script you need to keep the properties aligned to the same tab stop and not how it is above. Also please add a blank line under the last curly brace "}" after your css statements.