0

enter image description here

I'd like the second line of the text above to be in line with the first, as if they're in a paragraph

<img src="123.jpg"/>
Acquisto sicuro, pagamento in contanti alla consegna

I've tried to wrap the text in <p> but it breaks the line before the image. Also tried with <span> with both the text-only and the text+image, also with all possible attributes of the display (block, inline, ecc...) property. Still same result.

How do you do this?

Saturnix
  • 10,130
  • 17
  • 64
  • 120

1 Answers1

1

An (modern) option is to use a flexbox.

.container {
  display: flex;
  width: 300px; /* Just for demo purpose */
}

.container p {
  margin: 0;
}
<div class="container">
  <img src="https://www.fineartpixel.com/wp-content/uploads/edd/2018/01/THUMB_CartoonKidsHolding123Numbers.jpg" width="150" />
  <p>Acquisto sicuro, pagamento in contanti alla consegna</p>
</div>
Gerard
  • 15,418
  • 5
  • 30
  • 52