Help with Make a Website: CSS Styling


#1

I've been trying this code for countless times and I keep getting the error "Set the font-family of the h3 elements inside

..
to 'Shift', sans-serif.

.learn-more {
background-color: #f7f7f7;
.learn-more h3 {
font-family: 'Shift', sans-serif;
font-size: 18px;
font-weight: bold;
}

This is what my current code looks like. Please let me know what I'm not doing correctly.


#2

Try to put one more curly brace at the end,like this };


#3

I've tried that and it didn't work. I'm so confused.


#4

The format for every CSS rule is this:

selector {
    property: values;
    property: values;
}

You have two CSS rules there, but one of them is missing its }.


#5

I'm not sure I'm understanding the whole selector property thing. So, I don't know if that's where I'm going wrong.

I've tried to do the it this way and I've still got the same error message.


.learn-more {
background-color: #f7f7f7;
}
.learn-more h3 {
font-family: 'Shift', sans-serif;
font-size: 18px;
font-weight: bold;

#6

In order to use CSS to change the appearance, in other words, style, any of your HTML elements you must first select them. Then you list the properties that you would like to change and give their new values.

The diagram above shows the anatomy of a CSS rule:

  • rule: a list of CSS instructions for how to style a specific HTML element or group of HTML elements.
  • selector: specifies exactly which HTML elements to style. Here h1 is the selector.
  • properties and values: located inside the { } brackets, properties and values specify what aspect of the selector to style. In the diagram's example, the color property is set to red, which will display all h1 elements in red.

Here is one of the earlier exercises that you went through. In that exercise, you can tried out making some changes to the color property:

https://www.codecademy.com/en/skills/make-a-website/topics/css-properties-text/css-rule-intro-try

Please post ALL of your CSS code.