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 CSS: Cascading Style Sheets What is CSS?

CSS-Confusion

In the presentation "What is CSS" the following declaration is utilized: Footer { color: green; } This only changed the text in the footer to green. Why is this declaration restricted to the 'text'?

3 Answers

Dominik Sikiric
Dominik Sikiric
2,059 Points

Hi Khalil yes, color is directed to text, and background-color is directed to change of background color of that "element" in this case footer. You will get used to this after a while, don't worry :)

Thanks..smh...its clear now...lol

Well, clearly the style can't be directed to both the text and the background. If it was, the text wouldn't be visible. So most CSS styles are directed toward the text. backgrounds, borders, etc are controled with their own style declarations (IE border-color, background-color).

thanks..very helpful!