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
Orlando Hernandez
1,550 PointsClarity 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
Dave Evans
13,160 PointsHey 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
aliachaudhry
Courses Plus Student 1,091 Pointsbody { background-color: lightblue; }
channonhall
12,247 PointsGUYS there's the code
:root { background-color: lightblue; }
dxoxiifezd
19,729 PointsI think it's:
body { background-color: lightblue; }
channonhall
12,247 Pointsnope
Gage Smith
6,529 PointsYou 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!
Dave Evans
13,160 PointsHey 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.
Gage Smith
6,529 PointsWhoops!
My mistake.
Still Learning
Dave Evans
13,160 PointsNo problem. Keep on learning and kudos for helping with the forums!
Orlando Hernandez
1,550 PointsHey Guys, Thanks for the help. I appreciate it.
Paul Kirsch
2,894 PointsBTW, 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.
Anita Kristanova
2,092 PointsThanks 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!
Anthony Picard
5,765 PointsYay! Thank you! ^.^ Helps so much.