Learn Basic CSS by Building a Cafe Menu - Step 21

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

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 id="menu">
      <main>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
        <section>
          <h2>Coffee</h2>
        </section>
      </main>
    </div>
  </body>
</html>
/* file: styles.css */

/* User Editable Region */

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


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

/* User Editable Region */


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.31

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

Link to the challenge:

HI @Drywaller25 !

Welcome to the forum!

I would suggest resetting the lesson.

the lesson wants you to use the #menu selector to give your element a width of 300px .

Look more closely at the example they gave you

#example-id {
  width: 250px;
}

you need to add a new #menu selector with the width specified in the directions to pass the test.

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

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 id="menu">
      <main>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
        <section>
          <h2>Coffee</h2>
        </section>
      </main>
    </div>
  </body>
</html>
/* file: styles.css */

/* User Editable Region */

body {
  background-color: burlywood;
}

#menu-div { 
  width: 250px;
}

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

/* User Editable Region */


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.31

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

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!

1 Like

it tells me “You should have a #menu selector.”
im not sure what it mean since i have the menu but the word sector isnt in my code, any thoughts
and not sure if its sop[posed to be set to 250px or 300px

This is a body selector here

This is a #menu-div selector

1 Like

oh okay, i understand okay makes sense
my code looks right to you then?
because it wont pass.

Your code has two issues.

First issue is that you wrote the name #menu-div but the correct name is #menu

the second issue is that you wrote 250px but the directions say to use the 300px

you need to fix those issues to pass

BRAVO!!! thank you so much

good looking out seriously

I’m happy to help :+1:

1 Like

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