Solution 1 :

this way ?

* {
  box-sizing : border-box;
  }
div.parent {
  display          : flex;
  justify-content  : space-between;
  }
div.parent>div {
  background-color : #eee;
  width            : calc(95% / 4);
  padding          : 20px;
  }
div.parent>div>span:first-of-type {
  display : inline-block;
  width   : 100%;
  color   : red
  }
<body>
  <div class="parent">
    <div>
      <span>Product One</span>
      <span>This is Product</span>
    </div>
    <div>
      <span>Product Two</span>
      <span>This is Product</span>
    </div>
    <div>
      <span>Product Three</span>
      <span>This is Product</span>
    </div>
    <div>
      <span>Product Four</span>
      <span>This is Product</span>
    </div>
  </div>
</body>

Solution 2 :

* {
    box-sizing: border-box;
}

.parent {
    display: flex;
    justify-content: space-between;
}

.parent > div {
    background-color: #eee;
    width: calc(95% / 4);
    padding: 20px;
}
<body>
    <div class="parent">
        <div>
            <span>Product One</span>
            <div>This is Product</div>
        </div>
        <div>
            <span>Product Two</span>
            <div>This is Product</div>
        </div>
        <div>
            <span>Product Three</span>
            <div>This is Product</div>
        </div>
        <div>
            <span>Product Four</span>
            <div>This is Product</div>
        </div>
    </div>
</body>

Using can use div to move the text to a new line as div acts as a block element

Problem :

I want the texts “this is product” to be below the other texts that start with “product”. How can I do this?
I tried to put the strings in the <p> element, but it didn’t work, and I also set the display:block property for the <span> element, but it also didn’t work.
Do I put the texts in the <div> element?

the code i used :

* {
    box-sizing: border-box;
}

div {
    display: flex;
    justify-content: space-between;
}

div > div {
    background-color: #eee;
    width: calc(95% / 4);
    padding: 20px;
}
<body>
    <div class="parent">
        <div>
            <span>Product One</span>
            <span>This is Product</span>
        </div>
        <div>
            <span>Product Two</span>
            <span>This is Product</span>
        </div>
        <div>
            <span>Product Three</span>
            <span>This is Product</span>
        </div>
        <div>
            <span>Product Four</span>
            <span>This is Product</span>
        </div>
    </div>
</body>

Comments

Comment posted by Scott

Your nested divs are also

Comment posted by Brandon

Assuming you stick with

Comment posted by Lety

it should be enough to just change the first rule with div.parent and nothing else

Comment posted by Mister Jojo

@Lety if the line is too long (or too short), the second span will start after the previous one …

Comment posted by Lety

yes, you are right. I could be possible to change span with a block element.

By