Background color of the heading to Aqua: Stuck On the Exercise


#1



In the Foreground and Background exercise I can't get the okay to move on from the exercise as I don't seem to be setting the background color correctly. The exercise says to set the background color to Aqua, but I have tried multiple times and seem to be stuck.


.header {color: MidnightBlue; 
  background-image: url;
  height: 400px;
  background-position: center center;
}
header {background-color: Aqua;
}


#2

can you post the exercise url?


#3

I wasn't aware that was possible. The link to the exercise is below.

https://www.codecademy.com/courses/learn-html-css/lessons/css-colors/exercises/foreground-background?action=lesson_resume


#4

you posted at the wrong section on the forum, and i haven't done the new course yet, so can't access it.

anyway, the problem seems be to be here:

header {background-color: Aqua;
}

i don't see why you added it directly to already existing css selector. (.header), the new css selector is missing the . before the css selector


#5

What section of the forum was this supposed to be posted in?

How do you place it into the already existing css selector? I tried playing multiple times and didn't seem to work.


#6

well you can simply add it here:

.header {color: MidnightBlue; 
  background-image: url;
  height: 400px;
  background-position: center center;
  // add background-color here
}

the problem is, i haven't seen the exercise, and i haven't done it yet, so i can't access the exercise either, you posted on the forum of the old html css course, you are doing the new one, which has its own forum section (link), i am not sure which sub section it should be under, i guess Styling CSS (Colors), i will move your topic there for now

because i haven't done the exercises, it is super difficult for me to help you


#7

The background-color should have gone in the class with everything else. For example:

.header {
color: MidnightBlue;
background-image: url;
height: 400px;
background-position: center center;
background-color: Aqua;
}

Instead, to pass, you need to delete the last line of code:

.header {
color: MidnightBlue;
background-image: url;
height: 400px;
background-position: center center;
}


#8

So no-one thinks this looks wierd? I don't remember using curly brackets, though I'll go back and check. Also, upon further inspection, why are you trying to create a new parent element(header)?

.header { background-color: DarkMagenta;
backgroundimage:url("https://s3.amazonaws.com/codecademy-content/courses/web-101/unit-4/htmlcss1-img_coffee-bgnd.jpeg") ;
height: 400px;
color: RGB(3, 150, 100);
color: RGBa(3, 101, 100, 0.75);
background-position: center center;
}

h0llyl0u is right about having to get rid of it, but if you haven't passed step two(add Aqua) than you won't be able to pass the third and final step.(which is to get rid of Aqua)


#9

I have the same problem and I am blocked in this level


#10

So it seems that you have to color and background-color in h1 not the header.


#11

it shows me this error message :"Cannot read property '1' of null"


#12

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.