HTML CSS examples for CSS Layout:Column Layout
Columns layout with margin
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #cols {<!-- ww w . j a v a2 s .c om--> height: 100%; -webkit-column-width: 25em; -moz-column-width: 25em; -ms-column-width: 25em; -o-column-width: 25em; column-width: 25em; -webkit-column-gap: 0; -moz-column-gap: 0; -ms-column-gap: 0; -o-column-gap: 0; column-gap: 0; } #cols > div{ background:gold; height:50px; margin:5px 0; display:inline-block; width:100%; } </style> </head> <body> <div id="cols"> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> <div> ELEMENT </div> </div> </body> </html>