Learn Basic CSS by Building a Cafe Menu - Step 18

Tell us what’s happening:

i have done it like that and also
body ,h1, h2, p ,{ text-align: center; backgorund-color: brown: }

body{
backgorund-color:brown:
}

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Cafe Menu</title>
    <link href="styles.css" rel="stylesheet"/>
  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>
/* file: styles.css */

/* User Editable Region */

body ,h1, h2, p ,{
  text-align: center; backgorund-color: brown:
}


/* User Editable Region */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 18

this will change the background-color of all these elements.
DId the step say to change the background-color for all of these elements?

2 Likes

yes after that it says i need to
“You should use a body selector.”
i have changed the color but now its the body bit

you’re saying that ‘yes’ the step wanted you to change the color for all the elements?
Are you sure? Please quote the specific part of the step that said that.

1 Like

i have solved the previous problem but now it shows me that i need to use “body” slector
sorry for the confusion

1 Like

This is an example of a selector with property and values:

h1{
color: red;
}

The h1 is the selector, color is the property and red is the value, so instead of using more than one selectors like you did before just use the one asked of you to code your menu. Hope this helps. Goodluck! :pray:t4:

1 Like

I’m confused. If you’re still on the same step, you will need make the body the correct color requested.

i have done the other step- the backgorund color
now im on the body

1 Like


i have done that

1 Like

I get your area of confusion. You were asked to use just the body selector not with other elements like below:

<style>
h1, h2, h3{
background-color: brown;
}
</style>

instead you are asked to use one selector: body with a background color of brown. I will suggest reseting your code to clear all errors you might have made.

1 Like

you are not ‘on the body’.
You are trying to make the background-color of ALL the elements listed body/h1/h2/p into brown and that is NOT correct.

They want you to make ONLY the body’s background-color into brown.
Do you see that instruction is written in the step? It doesn’t say to make them ALL brown.

1 Like

thanks i have done it
:slight_smile:

2 Likes

Glad we could help. Goodluck in your coding journey ahead!

1 Like