How should i do this i am using this with the body part but it doesnt work width: 300px;

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

  **Your code so far**
\ file: <!DOCTYPE html>
<html>
<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" type="text/css" />
</head>
<body>
  <div>
    <header>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
    </header>
    <main>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </div>
</body>
<html>
<!DOCTYPE html>
<html>
<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" type="text/css" />
</head>
<body>
  <div>
    <header>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
    </header>
    <main>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </div>
</body>
<html>
\ file: body { 
background-color: burlywood;
width: 300px;
}

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


body { 
background-color: burlywood;
width: 300px;
}

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


  **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/15.5 Safari/605.1.15

Challenge: Step 22

Link to the challenge:

Hello there.

Do you have a question?

If so, please edit your post to include it in the Tell us what’s happening section.

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

Also, the more information you give us, the more likely we are to be able to help.

i am having problem to put the width in because it says this:
You should have a div type selector.
i used this

body {
  background-color: burlywood;
width:300px;
}

Ok, but this isn’t selecting the div. It is selecting the body.

how can i do the selective div.

i am searching in google but cant find any help

You added a style to select the body on this challenge:

yes i did make this step

ah okaayyyyyyy now done silly me

1 Like