Background color, height, and width


#1

body {
background-colour: #cc0000;
height: 100px;
width: 100px;
}
I'm still getting an error and I double checked the syntax.


#2

what is the error? you misspelled color in background-color, i know colour is british, but the web standards are american, so it is color


#3

Oops!It looks like your

doesn't have the right color.

cc0000


#4

missing word is div..sorry


#5

code not visible, please select your code and press ctrl + k, if you need inline code, put backticks around them (`), backticks are located above the tab key. ANd please post full code


#6

body {
background-color: #CC0000; <--- has to be with uppercase. and color instead of colour.
height: 100px;
width: 100px;
}


#7

ah...thanx alot.will try this.. Didn't know color code is case sensitive


#8

color code is case insensitive


#9

Make sure you also change the two "div"s to "background-color" this is on your index.html


#10

Your running into the issue of trying to add the code to the body when there is a nested (div)
The correct coding on the stylesheet.css should be as follows....

div {
background-color: #CC0000;
height: 100px;
width: 100px;
}


#11

Thanx..Much appreciated:blush:


#12

It could be the British spelling of color??


#13

you needed to revive a 3 month old topic for this remark? No, all the web standards are American, which means American grammar, which is color