HTML CSS examples for CSS Layout:Flex Width
Make a flexbox parent to have the width of its children
<html lang="en"> <head> <style> .parent {<!-- w w w . ja va2 s. com--> display: inline-flex; background-color: #777; } </style> </head> <body translate="no"> <div class="parent"> <div class="child"> one </div> <div class="child"> two </div> </div> </body> </html>