CSS by Building a Cafe Menu step 22

Step 22
The goal now is to make the div not take up the entire width of the page. 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.

  **Your code so far**
/* file: index.html */
<!DOCTYPE html>
  <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" type="text/css" />
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>

/* file: styles.css */
body {
background-color: burlywood;
h1, h2, p, div {
text-align: center;
width: 300

      **Your browser information:**

User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36 OPR/87.0.4390.58</code>

**Challenge:**  Step 22

**Link to the challenge:**

You are missing the unit px and the ending semicolon ;


width: 800px;

You are also supposed to create a new div selector, not add it to the list selector.

Hey, how do I create a new div to that specifically must be in the html or css file?

1 Like

Please open your own topic to discuss this.
Only post to someone else’s topic if you are commenting to help them answer their question.