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

Kayla Stogner
Kayla Stogner
3,270 Points

This challenge is telling me to select the body of the page and change its background to light blue using the CSS. How?

I've used CSS before and I don't know if I just have something simple wrong or not. Please help.

index.html
<!DOCTYPE html>
<html>
<head>
    <title>CSS Selectors</title>
    <link rel="stylesheet" href="cc1-main-styles.css" type="text/css" media="screen">
    <link rel="stylesheet" href="style.css" type="text/css" media="screen">
</head>

<body class="container">
    <h1><em>Hello</em> World!</h1>
    <div>
        <p>
            <em>Lorem ipsum dolor</em> sit amet, consectetur adipiscing elit. Nunc pulvinar consequat tortor, nec venenatis erat elementum scelerisque. Curabitur sit amet risus nisi. Aenean aliquet euismod augue at viverra. Ut varius arcu in lorem iaculis ullamcorper. Integer eu rutrum quam.
        </p>
    </div>
</body>
</html>
style.css
/* Complete the challenge by writing CSS below */
.container {
  background-color:"lightblue";
}

1 Answer

Charlie Thomas
Charlie Thomas
40,856 Points

You need to use an element selector and the color does not need to be in quotes:

body {
  background: lightblue;
}
Kayla Stogner
Kayla Stogner
3,270 Points

I was able to go back into the video and realize my mistake just after posting this. Thanks for the quick response though!

Charlie Thomas
Charlie Thomas
40,856 Points

No problem. I know the feeling of posting a problem then being able to solve it myself. Just post again if you want any more help.