Learn Basic CSS by Building a Cafe Menu - Step 22

Tell us what’s happening:
Describe your issue in detail here.

I dont really understand how to do it.

would the div be placed on top of the body like ```

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

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

  **Your browser information:**

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

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

Link to the challenge:

<div class="square"></div>

type or pas ```

```te code here ```

hi Karla,

thanks for trying to post your code. The code you posted in the last comment though is HTML not CSS.
It looks like this exercise wants you to add some CSS as it says

The CSS width property is perfect for this. Create a new type selector in the style sheet that gives your div element a width of 300px .

If you are unsure what is CSS, look at the code provided in the exercise and notice how it is laid out and written. That is CSS. Here it is for reference again:

body {
  background-color: burlywood;
}

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

The CSS language lets you target certain html tags and tells the browser that these tags need to be treated in a special way.

For eg. in the code sample you’ve been shown in the exercise, they are targeting the body tag because they want the browser to change the background-color of that area to something other than the default.

hope this points you in the proper direction

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