HTML CSS examples for CSS Layout:Flex Align
Create Flexbox layout with horizontal groups, align last div to right
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> header<!-- ww w . j a v a 2 s . com--> { display:flex; } header>div { margin-right:auto; } header>span { margin-left:auto; } </style> </head> <body> <header> <div> 1 </div> <div> 2 </div> <div> 3 </div> <span>Right</span> </header> </body> </html>