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 trialShahar Ohayon
4,868 PointsIf you can please post the code?
You can also try
h1,
h2 {
background: green;
}
2 Answers
paul white
13,958 PointsIs there another css declaration from somewhere else overwriting your declaration for the background color? Although it's not a best practice, try adding !important to your css and see if that helps. If so, you may have to hunt down what is overriding your css.
h1, h2 {
background: green !important;
}
You could also try getting more specific with your css by using background-color instead of background.
Katharine Cooney
4,612 PointsI know this is delayed, but! I was having the same issue. My h1 and h2 were fine until this part of the lesson. I just scrolled through my text and realized that several of my selectors at the bottom of the file were highlighted red. I realized that I forgot to add a closed curly bracket } to one of my CSS rules! Maybe you were having the same problem.
Seth Kroger
56,413 PointsSeth Kroger
56,413 PointsCan you post the code you have? (Wrap your code with 3 backticks (```) on the line before and after, and optionally the language after the first set like ```html or ```css) Or take a snapshot of your workspace (camera icon in upper right) and share the link?