Foreground&background


#1

i’m having trouble about styling css (colours), they asking me to set the background colour of the subheadings in dark magenta but it’s just not working.


#2

Can you post your code? It will let us help you better.


#3

yeah here it is!


#4

You have a couple errors happening there, as the red dots indicate. The major error is you have one too many } in there. Nothing from the font-family: line is getting acted upon. Take out the closing bracket above it and you’ll likely see as difference. Second, color names generally are case sensitive.

It should look something like this:

  color: Crimson;
  color: DarkMagenta;
  font-family: 'Covered By Your Grace', sans-serif;
  font-size: 100px;
  line-height: 76px;
  margin: 0;
  position: relative;
  text-align: center;
  top: 20%;

#5

Your subheading properties are not in a selector. Look carefully right after the closing braces ’ } ’ of your h1. Right before font-family: ‘Covered By Your Grace’. The opening selector is missing, making all colors red in that region.
It should be as below:

h1 {
font-family: ‘Covered By Your Grace’, sans-serif;
font-size: 100px;
line-height: 76px;
margin: 0;
position: relative;
text-align: center;
top: 20px;
}

That should do but always take note of changing colors in the editor cus they will guide you alot


#6

oh i got it! thank you


#7

Hi, I’m stuck at the same spot as you, I’ve tried everything and it doesn’t work, could you help me with this ?


#8

The exercise wants you to set the background color of the subheading. Move your background color line of code to the h2 section.


#9

Cannot read property ‘1’ of null?

I think the error is somewhere within your code.

Review from top to bottom, Maybe 1 was mistyped somewhere.

If error persists, reset the exercise and start all over


#10

That came up for me as well when I reset the exercise code, and completed step 1. As soon as I entered the background color for step 2 the error message disappeared.


#11

hello,you
Thank you for your help !


#12

hello,i am stuck exo css color 8/9 i tried all the solution ??? Thank You


#13

Your answer should be in this form rgb(3, 150, 100);

Note: There shouldn’t be a comma after 100


#14

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