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 trialKhalil Muhsin
451 PointsCSS-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
2,059 PointsHi 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 :)
Gordon Reeder
2,521 PointsWell, 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).
Khalil Muhsin
451 Pointsthanks..very helpful!
Khalil Muhsin
451 PointsKhalil Muhsin
451 PointsThanks..smh...its clear now...lol