Learn Basic CSS by Building a Cafe Menu - Step 14

Tell us what’s happening:
Describe your issue in detail here.
im not sure what its asking me to do ive tried to re-write it in the box and also in the pre written code

Your code so far

<!-- file: index.html -->
<!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>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>
/* file: styles.css */

/* User Editable Region */

h1{ text-align: center;}
h2{ text-align: center;}
p{ text-align: center;}

/* User Editable Region */


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15

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

Link to the challenge:

this is not what they were expecting.

Can you show us what else you tried?
(you should reset and copy the code from index.html as-is)

I believe that the challenge is expecting you to group all of the selectors together, so that you only need declare the text-align style once, for all of them. You can do this by separating the selectors with commas and then creating one style declaration with a single set of curly brackets.

Yes I played around more with it and I needed to list it altogether the instructions confused me thank you though

1 Like
h1, h2, p { text-align: center; }

Like this correct? and I ask because mine says that is wrong and Im not sure where.

It looks okay. However:

If you have a question about a specific challenge as it relates to your written code for that challenge, and you’ve tried to solve it at least 3 times so far and still need some help, just click the Ask for Help button located on the challenge (it looks like a question mark).
This button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

Ps. You may have a problems with your browser. Please create a topic for further discussions.