property-value
display/inline-flex — CSS reference
Creates an atomic inline-level flex container. Its own box can share a line with adjacent inline-level content, while its children use flex layout. This is the legacy spelling of inline flex.
Formal Syntax & Structure
css syntaxcss
display: inline-flex; /* inline flex */Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS flow layout lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{font:16px/20px sans-serif} #p{width:240px;background:#e6eef2} .tile{background:#c2e4d5} #a,#b{box-sizing:content-box}#p{display:inline-flex;width:auto;gap:5px;vertical-align:top;}#a,#b{width:60px;height:30px}#c{display:inline-block;width:30px;height:30px;vertical-align:top}</style><body><span id="p"><span class="tile" id="a">First</span><span class="tile" id="b">Second</span></span><span id="c">Peer</span></body></html>