Learn Basic CSS by Building a Cafe Menu - Step 51

Tell us what’s happening:
Describe your issue in detail here.
Honestly I’ve been trying to do many things, but nothing work. How can I pass it?
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 class="menu">
      <main>
        <h1>CAMPER CAFE</h1>
        <p>Est. 2020</p>
        <section>
          <h2>Coffee</h2>
          <article class="item">
            <p class="flavor">French Vanilla</p><p class="price">3.00</p>
          </article>
          <article class="item">
            <p class="flavor">Caramel Macchiato</p><p class="price">3.75</p>
          </article>
          <article class="item">
            <p class="flavor">Pumpkin Spice</p><p class="price">3.50</p>
          </article>
          <article class="item">
            <p class="flavor">Hazelnut</p><p class="price">4.00</p>
          </article>
          <article class="item">
            <p class="flavor">Mocha</p><p class="price">4.50</p>
          </article>
        </section>
        <section>
          <h2>Desserts</h2>
          <article class="item">
            <p class="dessert">Donut</p><p class="price">1.50</p>
          </article>
        </section>
      </main>
    </div>
  </body>
</html>
/* file: styles.css */
body {
  background-image: url(https://cdn.freecodecamp.org/curriculum/css-cafe/beans.jpg);
}

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

.menu {
  width: 80%;
  background-color: burlywood;
  margin-left: auto;
  margin-right: auto;
}

.item p {
  display: inline-block;
}


/* User Editable Region */

.flavor {
  text-align: left;
  width: 75%;
} 
.dessert {
  text-align: left;
  width: 75%
}

/* User Editable Region */


.price {
  text-align: right;
  width: 25%
}

Your browser information:

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

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

Link to the challenge:

Hello, your close, but the instructions would like you to group the .dessert with the .flavor class. Instead of a separate selector. Hope this helps🙂

2 Likes

Welcome to the community!

@ziggybryson has provided great guidance.

I am just adding a quote from your previous code to show that you have used a multiple selector method previously, and to help remind you how it is done.

@ziggybryson deserves all of the credit for guidance, though.

Keep up the good progress!

3 Likes

@Gray.n.Grey great example! Couldn’t have explained it better!

3 Likes

Thank you @Gray.n.Grey and @ziggybryson for your help, but honestly I didn’t understand I had to put a comma between .flavor and .dessert, but luckily I passed it. Thank you a lot both

2 Likes

No problem at all!!! I’m glad you passed the lesson.:slightly_smiling_face:

2 Likes