HTML CSS examples for CSS Layout:Flex Align
In Flexbox using align one item to the end horizontally
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!--from w w w . j a va2 s . com--> border:3px solid; height:501px; display:flex; flex-direction:row; } .box { border:2px solid; height:201px; width:51px; } .a { background-color:Chartreuse; } .b { background-color:yellow; } .c { background-color:blue; margin-left:auto; } </style> </head> <body> <div class="container"> <div class="box a"> </div> <div class="box b"> </div> <div class="box c"> </div> </div> </body> </html>