This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

109 points
4f683c19f4aeb56b00717084dec27a75?s=140&d=retro
Submitted by
jowama
about 3 years ago

Background color, height and width

My problem so far is this question on CSS Overview Question 19/26
In the stylesheet.css tab:

The question is:
Set the background-color to #cc0000, like this: background-color: #cc0000;
Set the height to 100px, like this: height: 100px;
Set the width to 100px, as well.

My answer was:
body
{
background-color:#cc0000;
height: 100px;
width: 100px;
}

error message:

Oops, try again. It looks like your doesn't have the right background-color (#cc0000)!

where am i going wrong.

Somebody help.


2 votes

permalink

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

I figured it out all i needed to change was div since it was in the section of html and not the body.

109 points
4f683c19f4aeb56b00717084dec27a75?s=140&d=retro
Submitted by
jowama
about 3 years ago

1 Comment

Ab7dddfeb23e42d68cd6306111e07402?s=140&d=retro HalimaJahanMuskan over 2 years ago

At last i got my ans.....


-1 votes

permalink

I was having the same prob, just realized needed to be div
lol

575 points
Picture
Submitted by
Mike Moore
almost 3 years ago

1 Comment

Picture Mike Moore almost 3 years ago

< div>