HTML CSS examples for CSS Layout:Flex Row
make gallery row go to new line with flex
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container{<!-- w w w .ja v a 2 s . c o m--> display:flex; justify-content:space-evenly; align-items:center; flex-wrap: wrap; } .inner{ width:30%; background:#efefef; margin-left:1.662%; margin-right:1.662%; } </style> </head> <body> <div class="container"> <div class="inner"> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid perferendis dolor, ducimus facilis voluptas provident consectetur natus modi eum soluta dolores explicabo deserunt debitis incidunt aperiam placeat, doloribus vel fuga? </p> </div> <div class="inner"> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid perferendis dolor, ducimus facilis voluptas provident consectetur natus modi eum soluta dolores explicabo deserunt debitis incidunt aperiam placeat, doloribus vel fuga? </p> </div> <div class="inner"> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid perferendis dolor, ducimus facilis voluptas provident consectetur natus modi eum soluta dolores explicabo deserunt debitis incidunt aperiam placeat, doloribus vel fuga? </p> </div> <div class="inner"> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid perferendis dolor, ducimus facilis voluptas provident consectetur natus modi eum soluta dolores explicabo deserunt debitis incidunt aperiam placeat, doloribus vel fuga? </p> </div> </div> </body> </html>