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 trial

CSS How to Make a Website Styling Web Pages and Navigation Style the Image Captions

Gabriel Rowe
Gabriel Rowe
5,204 Points

Color does not change from green to grey as shown

I've looked several times and can't seem to figure this out!

Here's my code:

#gallery li a p {
  margin: 0;
  padding: 5%;
  font-size: 0.75em;
  color: bdc3c7;
}

First row, after 'li':

If it's the paragraph you're trying to change color of, remove the 'a'
If it's the anchor you're trying to change color of, remove the 'p'

3 Answers

Can you share the full HTML and CSS so that I can understand what it is you're trying to do?
And just to be sure, have you checked to see if your statements aren't superseded by any overwriting statements?
It's very important in what order your CSS is in your file. It interprets it from top to bottom, so if you change your color again below your statement - that new color is the one that's going to be the one rendered (with some exceptions like specificity).

Gabriel Rowe
Gabriel Rowe
5,204 Points

I figured it out! I stupidly forgot to add a '#' to the color. Thanks again for your help!

Gabriel Rowe
Gabriel Rowe
5,204 Points

Thanks for the fast reply! Unfortunately that didn't work. As I understand from the video, I am trying to change both the a and p elements. My code is written exactly the same as in the video, with the exception of adding a semi-colon which they forgot to add. Any other thoughts?

I'll watch the video...