HTML CSS examples for CSS Layout:Flex
Using display:inline-flex in a child element
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .my-inline-element {<!--from ww w . j av a2 s . c o m--> border:3px solid Chartreuse; display:inline; margin-right:6px; } .my-inline-element span { display:inline-flex; } </style> </head> <body> <div class="my-inline-element"> <span>Item1</span> </div> <div class="my-inline-element"> <span>Item2</span> </div> <div class="my-inline-element"> <span>Item3</span> </div> </body> </html>