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

Clarity on "select the body of the page and set background color to light blue"

Hi Guys, i am having a little problem with this part of the CSS. "Select the body of the page and sets its background color to light blue". Here's what i did. Can i get a little more clarity on this?

body { background-color: #cadde5; }

Bummer! Check the body selector in your CSS. Make sure background-color is set to 'lightblue'.

10 Answers

Hey Gage, For HTML elements that you are styling you don't use the class (.) or id (#) before. For instance you would use something like this:

html {some styling} 
body {some styling} 
div {some styling} 
header {some styling} /*HTML5 Element*/ 
nav {some styling} /*HTML5 Element*/ 
footer {some styling} /*HTML5 Element*/ 
section {some styling} /*HTML5 Element*/ 
aside {some styling} /*HTML5 Element*/ 

Francisco actually answered it correctly. Some colors are able to be typed in directly instead of using HEX or RGBA

body { background-color: lightblue; }

GUYS there's the code

:root { background-color: lightblue; }

I think it's:

body { background-color: lightblue; }

nope

You may have forgotten your label for the selector.

  • = universal . = class # = id

If I'm not mistaken, your entry to should read: .body{ background-color: #CADDEG; }

That's a period [ . } before the word [body] . This signifies to the browser that you are modifying the [class body] in your HTML file.

Hopefully that helps.

Happy Treehousing!

Hey Gage, For HTML elements that you are styling you don't use the class (.) or id (#) before. For instance you would use something like this: html {some styling} body {some styling} div {some styling} header {some styling} /HTML5 Element/ nav {some styling} /HTML5 Element/ footer {some styling} /HTML5 Element/ section {some styling} /HTML5 Element/ aside {some styling} /HTML5 Element/ Francisco actually answered it correctly. Some colors are able to be typed in directly instead of using HEX or RGBA.

Whoops!

My mistake.

Still Learning

No problem. Keep on learning and kudos for helping with the forums!

Hey Guys, Thanks for the help. I appreciate it.

BTW, may be obvious to some, but be sure to click the style.css file at the top. this is an external CSS. Not done in the HTML.

Thanks for the last comment, I tried to type almost hundred times the background color but didn't realize I'm writing in html not CSS,therefore, it didn't work.. Jesus!

Yay! Thank you! ^.^ Helps so much.