Putting p elements on one line with no space between them

Tell us what’s happening:
Describe your issue in detail here.
I should put the p elements on one line with no space between them. I did that but the code does not pass. Only the space between the Vanilla and Flavor remained so I deleted it. Nevertheless I am still required to leave no space nut there is no space now to delete. Please tell me what to do.

  **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 class="menu">
    <header>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
    </header>
    <main>
      <section>
        <h2>Coffee</h2>
        <article class="item">
          <p>FrenchVanilla3.00</p> 
        </article>
        <article>
          <p>Caramel Macchiato</p>
          <p>3.75</p>
        </article>
        <article>
          <p>Pumpkin Spice</p>
          <p>3.50</p>
        </article>
        <article>
          <p>Hazelnut</p>
          <p>4.00</p>
        </article>
        <article>
          <p>Mocha</p>
          <p>4.50</p>
        </article>
      </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 class="menu">
    <header>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
    </header>
    <main>
      <section>
        <h2>Coffee</h2>
        <article class="item">
          <p>FrenchVanilla3.00</p> 
        </article>
        <article>
          <p>Caramel Macchiato</p>
          <p>3.75</p>
        </article>
        <article>
          <p>Pumpkin Spice</p>
          <p>3.50</p>
        </article>
        <article>
          <p>Hazelnut</p>
          <p>4.00</p>
        </article>
        <article>
          <p>Mocha</p>
          <p>4.50</p>
        </article>
      </section>
    </main>
  </div>
</body>
<html>
\ file: 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 {
text-align: left;
width: 49%;
}

.price {
text-align: right;
width: 49%;
}
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 {
text-align: left;
width: 49%;
}

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

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

Challenge: Step 41

Link to the challenge:

Hi, the task is asking you to put the two p elements on the same line, not turn them into one p element.

The end tag of the first p element should be on the same code line as the starting tag of the second p element.

Hope that helps!

Well, it worked. Thank you. I just would like to add that although it worked its logic is not clear. I have to memorize it as it is, without understanding its jogic.

1 Like

Which part is confusing you,

Is it having no space between elements?

Or why you’re doing this to the layout?

I’ll see if I can explain further, knowing the logic behind it is the useful part.

It is why doing that. Why putting both p elements on one line and why no space between them? What is the logic for it?
Thanks in advance.

From what I can gather it means the flavour and price class widths can be returned to the values the lesson attempted previously to make the p elements be on the same line as separate paragraphs.

Most of this menu building activity is about how to get HTML to format visually how you want. This can involve a lot of fiddling around and trying various code until it’s right. Or taking working but messy code and reworking it.

I hope this makes sense, I did complete this set of lessons but it’s been a few weeks.

Thank you. I am not in a position to evaluate it any way.