Learn Basic CSS by Building a Cafe Menu - Step 27

Tell us what’s happening:

I can’t tell what’s wrong with my code. I removed the id attribut and added a class attribut with the value “menu” and it’s styling my page but form some reasons it won’t accept my code. I searched even on YouTube and others did the same thing but the passed. anyway I don’t know if it’s a bug or what but help please.

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>

<!-- User Editable Region -->

    <div class="menu">

<!-- User Editable Region -->

      <main>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
        <section>
          <h2>Coffee</h2>
        </section>
      </main>
    </div>
  </body>
</html>
/* file: styles.css */
body {
  /*
  background-color: burlywood;
  */
}

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

.menu {
  width: 80%;
  background-color: burlywood;
  margin-left: auto;
  margin-right: auto;
}

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/17.2.1 Safari/605.1.15

Challenge Information:

Learn Basic CSS by Building a Cafe Menu - Step 27

Your code looks ok to me. Are you getting an error message?
I would try resetting the lesson and then resubmitting your code.
You could also try a hard refresh of the page (CTRL+F5) or even try a different browser, if all else fails.

1 Like

Yaa Your code is 100% correct!
I have also tried it!

1 Like

I downloaded the freecodecamp app and did the same thing on my phone and it passed. problem solved but I hope others won’t have the same issue.

1 Like