How to cancel the transition to a new line after the div block?

<div class="product-price"> <p>19.99€</p> </div> <p>/gab.</p> 
  • .product-price {display: inline-block;} ? - vp_arth 6:49 pm

1 answer 1

The problem is not only in a div , the paragraphs are also block:

 .product-price, .product-price > p, /*Параграф внутри div*/ .product-price + p /*Параграф после div*/ { display: inline-block; } 
 <div class="product-price"> <p>19.99€</p> </div> <p>/gab.</p> 

It is probably easier to use inline elements:

 .product-price { display: inline-block; } 
 <div class="product-price"> <span>19.99€</span> </div> <span>/gab.</span>