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 CSS Foundations Selectors Type, Class, and ID Selectors

Select the em insideSelect the em inside the paragraph using a descendant selector. Set its color to red.

Can't figure out what's wrong??

p em {color: red};

2 Answers

geoffrey
geoffrey
28,736 Points

What you typed on the forum is good, but maybe there is something wrong in your code above what you typed (as you haven't posted it, I can't tell), probably an unnecessary curcly brace ? I don't know, you should check, here is the right css.

EDIT: you closed the curcly brace and then you put the semi-colon, It's the reverse...That's the mistake you did.

body{

  background-color:lightblue;
}

h1{
 color:darkblue; 

}

p em{

  color:red;

}

Thank you Geoffrey,

Looks like the ( ; ) was the problem I remove the ( ; ) inside the curly braces and worked! thanks again