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 trialfatheedabbagh
1,064 PointsWhy is My CSS code highlighted red? After Page: portfolio, #gallery, #gallery li #gallery li ap, etc are all red
#gallery {
margin: 0;
padding: 0;
List-style: none;
}
#gallery li {
float: left;
width: 45%;
margin: 2.5%;
background-color: #f5f5f5;
color: #bdc3c7;
}
#gallery li a p {
margin: 0;
padding: 5%;
font-size: 0.75em;
color: #bdc3c7;
}
/*******************************
Colors
********************************/
/* Site body*/
body {
background-color: #fff;
color:#999;
}
/*green header*/
header {
background: #6ab47b;
border-color: #599a68;
}
/*nav background on mobile*/
nav {
background:#599a68;
}
/*logo text */
h1, h2 {
color: #fff;
}
/*Links*/
a {
color: #6ab47b;
}
/*nav link*/
nav a, nav a:visited {
color:#fff;
}
/*Selected nav link*/
nav a.selected, nav a:hover {
color: #32673f;
}
3 Answers
Ron McCranie
7,837 PointsI think that might just be the way it hilights the code. Are you seeing any errors or problems with your css?
James Home
12,011 PointsI can't see anything that stands out. I thought you might have left something open but it doesn't seem that way. Try moving CSS around to see what happens (like the suspected troublemaker to the top).
fatheedabbagh
1,064 Pointsgave it a shot, nothing happened. :(
fatheedabbagh
1,064 PointsI figured it out, the code above page portfolio was not closed. Thanks James and Ron for helping
fatheedabbagh
1,064 Pointsfatheedabbagh
1,064 Pointsit's like that through every code to the bottom, After Colors, body, header, nav and so on are highlighted red as well but all the codes above Page: Porfolio are not highlighted red and yes the header is not showing green whenever I preview the page.
Ron McCranie
7,837 PointsRon McCranie
7,837 PointsDo you have a link to what you're looking at to help us narrow down an issue? A share link to your workspace or posting the entire html & css would work.