HTML CSS examples for CSS Layout:Flex Align
Align items using flex
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .parent {<!--from ww w. ja v a 2 s. c om--> display:flex; justify-content:center; } .box { width:201px; height:201px; background:Chartreuse; margin:21px } </style> </head> <body> <div class="parent"> <div class="child child--left"> <div class="box"></div> </div> <div class="child child--right"> <div class="box"></div> </div> <div class="child child--right"> <div class="box"></div> </div> </div> </body> </html>