Doubt on Step 52

Tell us what’s happening:
Describe your issue in detail here.
I didn’t get it please Help!

  **Your code so far**
/* file: index.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 class="menu">
    <header>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
    </header>
    <main>
      <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;
}

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

.price {
text-align: right;
width: 25%
}
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0

Challenge: Step 52

Link to the challenge:

You need to add the dessert, to the flavor select in the css.

This part says all:

Since the flavor class selector already has the properties you want, just add the dessert class name to it.

@txt88 Don’t get it! Please Elaborate.

Hello there @anujpophali,
The challenge requests you to add a class to an existing class with some properties/styles so they can share the same styles. To do this you just have to separate these classes with a comma " , ".

For example (first class with all styles):

.first-class {
    width: 80%;
    background-color: burlywood;
    margin-left: auto;
}

If you want to add another class that will share these same styles which is in the .first-class all you have to do is separate them with a comma like this (two independent classes sharing same styles):

.first-class, .second-class {
    width: 80%;
    background-color: burlywood;
    margin-left: auto;
}

Now everywhere you use the .second-class all the elements will share the same styles as .first-class unless modified separately.

Hope this helps. Happy Coding :+1:!

Sure!

You already have set the flavor in the css file, right?
Like this:
.flavor { text-align: left; width: 75%; }

Now you need to add the name .dessert to this.
Like .flavor, .dessert { ....

1 Like

Thanks @teamie I was thinking bit odd :sweat_smile: :smiling_face_with_tear: Its too easy… :+1:

1 Like

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