Learn Basic CSS by Building a Cafe Menu - Step 14

Tell us what’s happening: finding it difficult to pass this test
Describe your issue in detail here.

  **Your code so far**
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Cafe Menu</title>
  <style>
    h1,{
      text-align: center;
    }
    h2,{
      text-align: center;
    }
     p,{
      text-align: center;
    }
  </style>
</head>
<body>
  <header>
    <h1>CAMPER CAFE</h1>
    <p>Est. 2020</p>
  </header>
  <main>
    <section>
      <h2>Coffee</h2>
    </section>
  </main>
</body>
</html>
  **Your browser information:**

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

Challenge: Learn Basic CSS by Building a Cafe Menu - Step 14

Link to the challenge:

Hey! Welcome to the freeCodeCamp’s community forums.

Learning to describe the bugs or issues you’re facing is a great skill to have in a developer, it may seem hard at first, but you should at least provide a brief summary of what you are trying to accomplish and what’s the error that shows up when you try to run your code.

Whenever you face a problem , you should look at the instructions and read them carefully to make sure you aren’t missing anything. In this challenge, these are the instructions provided to you.

image

As mentioned, you need to use a single type selector for all of the elements.
Which basically means that instead of selecting and changing the properties of each element individually, you can reuse the same styles for multiple elements by comma separating them.

For example, if i want to change the background color of all of the buttons and input elements in my code, i can do something like this:

/* instead of this */
button{
    background-color: red;
}

input{
    background-color: red;
}

/* i can do this */
button, input{
    background-color: red;
}

Hope this helps! :smile:

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