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

Question about Pixels and Percentages Challenge

I seem to be stuck on Question One of the P and P Challenge. The question asks "Let's make the <span> element with the class "title" larger. Increase its font size to 26 pixels."

My answer is:

span title { font-size: 26px; }

This seems correct to me, but the computer returns the following:

"Bummer! Make sure you're setting 'font-size' to 26 pixels."

What am I missing?

Thanks!

.title { font-size: 26px; }

try this

2 Answers

Steven Parker
Steven Parker
243,318 Points

A selector of "span title" would target a <title> element that is inside a <span> element. But of course this would never occur because <title> elements are only found in the <head> section, and <span>'s in the <body>.

But the selector for a <span> element with the class "title" would be "span.title" (with a period instead of a space).

Yes that worked. I understand what I did wrong now. Thank you!