HTML CSS examples for CSS Layout:Position
CSS and positioning a group of divs
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!-- w ww. ja v a 2 s . c om--> display:flex; flex-direction:row; justify-content:space-around; width:11rem; } .parent { display:flex; flex-direction:column; justify-content:center; align-items:center; } .parent div { margin:9px 0; } </style> </head> <body> <div class="container"> <div class="parent"> <div> Lor </div> <div> Lor </div> <div> Lor </div> </div> <div class="parent"> <div> Lor </div> <div> Lor </div> <div> Lor </div> <div> Lor </div> </div> <div class="parent"> <div> Lor </div> <div> Lor </div> <div> Lor </div> <div> Lor </div> <div> Lor </div> </div> </div> </body> </html>