HTML CSS examples for CSS Layout:Flex Center
Using Flex layout to center vertically and align one div to right horizontally
<html> <head> <style> .wrap {<!-- w w w .ja v a2s . c o m--> display:flex; box-shadow:0 0 0 2px black; height:401px; align-items:center; justify-content:space-between; } .wrap>* { box-shadow:0 0 0 2px black; padding:21px; } .nextToLeft { margin-right:auto; } </style> </head> <body> <div class="wrap"> <div class="left"> 1 </div> <div class="nextToLeft"> 2 </div> <div class="right"> 3 </div> </div> </body> </html>