Learn Basic CSS by Building a Cafe Menu - Step 28

Does anyone see an error??

<!-- 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>
.menu {
 width: 80%;
 background-color: burlywood;
 margin-left: auto;
 margin-right: auto;
}
      <main>
        <header>
          <h1>CAMPER CAFE</h1>
          <p>Est. 2020</p>
        </header>
        <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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36

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

Link to the challenge:

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

I see people still trying to help you on the previous post. Would be good to mark it as solved or just say you are good so no other responses are made…

Oh ok! I didn’t even know that was an option! Awesome!

The exercise is saying:

add a class attribute to the div element’s opening tag and set its value to menu .

From what I can see you are mixing up css with html .

An attribute is html…

ok so isnt it just .menu???

.menu is the css term

how do you create a class in html though?

In step 27 you were asked to swap out the div element for a class element using .menu, which you did correctly on the CSS file, but it looks like you might have also done this in the HTML file - I’m not clued up enough to know why that wouldn’t flag as an error, but because you are now being asked to insert an attribute (generally nested inside an opening tag) into the div element on your HTML file, you can’t physically do that because you don’t have a div opening tag in your HTML file.

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