HTML CSS examples for CSS Layout:Layout
create bricks(divs) dynamically to make brick wall like layout
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .brick {<!--from w w w . j a va 2 s . com--> display:inline-block; padding:6px; background:red; margin:2px; } </style> </head> <body> <div class="brick"> Lorem </div> <div class="brick"> Lorem ipsum do </div> <div class="brick"> Lorem ipsum d </div> <div class="brick"> Lorem </div> <div class="brick"> Lorem ipsum do </div> <div class="brick"> Lorem ipsum d </div> <div class="brick"> Lorem </div> <div class="brick"> Lorem ipsum do </div> <div class="brick"> Lorem ipsum d </div> <div class="brick"> Lorem </div> <div class="brick"> Lorem ipsum do </div> <div class="brick"> Lorem ipsum d </div> <div class="brick"> Lorem </div> <div class="brick"> Lorem ipsum do </div> <div class="brick"> Lorem ipsum d </div> <div class="brick"> Lorem </div> <div class="brick"> Lorem ipsum do </div> <div class="brick"> Lorem ipsum d </div> <div class="brick"> Lorem </div> <div class="brick"> Lorem ipsum do </div> <div class="brick"> Lorem ipsum d </div> </body> </html>