HTML CSS examples for CSS Layout:4 Column
Create 2 columns, 4 control with preceding labels keeping markup in by column order
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> ul {<!-- w w w.j av a 2s. c o m--> padding-left:0; list-style-type:none; -webkit-column-count: 2; -moz-column-count: 2; column-count: 2; } label, input { display:inline-block; width:49%; } .container { width: 100%; box-sizing: border-box; } </style> </head> <body> <div class="container"> <ul> <li> <label for="input1">label1</label> <input type="text" name="input1"> </li> <li> <label for="input2">label2</label> <input type="text" name="input2"> </li> <li> <label for="input3">label3</label> <input type="text" name="input3"> </li> <li> <label for="input4">label4</label> <input type="text" name="input4"> </li> </ul> </div> </body> </html>