<div style="width: 250px; background-color: lightcoral">
<div style="display: inline-flex;">Lorem Ipsum</div><div style="display: inline-flex;white-space-collapse: preserve;">, </div><div style="display: inline-flex;">consetetursadipscing elitr, sed diam</div>
</div>
<div style="width: 250px; background-color: lightyellow">
<div style="display: inline-flex;">Lorem Ipsum, consetetursadipscing elitr, sed diam</div>
</div>
How can I style the divs in the red div so that they look like the yellow div?
3
Answers
Try this it will work as you have asked
inline-flex
is a property for layout between flex boxes.It may be difficult to understand the way you want to use it, but..
The different usage requires complexity.
flex
,inline-flex
andblock
,inline-block
have a similar context.please check this.
https://www.samanthaming.com/flexbox30/7-display/