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 Basics (2014) Basic Selectors Intro to Selectors

Philip Kroupoderov
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Philip Kroupoderov
Front End Web Development Techdegree Graduate 21,641 Points

Why is the bg white??

Guil said that * will select all elements in the html file. He set the color to red. But why is the background still white??? It's defined by the <body> tags. Does the * selector also modify the <body> tag?? From what I can see it does not, and Guil did not mention that.

1 Answer

Wade Williams
Wade Williams
24,476 Points

The "color" property changes the color of the text, not the background color. So you'll notice that all text on the page is red. To do the background you would do:

* {
    background-color: red;
}