html - How to line up text boxes and balance them out? -


i have 12 text boxes shown below. want line them same number of boxes appear on top , bottom always. example, might 2 rows of 6, or @ screen width might 3 rows of 4 boxes. want spaces in between rows looks better. lastly, should line up, noticed bottom row seems have space in top , bottom rows not aligned perfectly.

what best way this?

<input name="neighborhood1" type="text" id="neighborhood1"> <input name="neighborhood2" type="text" id="neighborhood2"> <input name="neighborhood3" type="text" id="neighborhood3"> <input name="neighborhood4" type="text" id="neighborhood4"> <input name="neighborhood5" type="text" id="neighborhood5"> <input name="neighborhood6" type="text" id="neighborhood6"> <input name="neighborhood7" type="text" id="neighborhood7"> <input name="neighborhood8" type="text" id="neighborhood8"> <input name="neighborhood9" type="text" id="neighborhood9"> <input name="neighborhood10" type="text" id="neighborhood10"> <input name="neighborhood11" type="text" id="neighborhood11"> <input name="neighborhood12" type="text" id="neighborhood12"> 

it possible without loading bootstrap. want fluid layout 12 inputs @ different breakpoints. used susy calculations, it's percentage widths , media queries really. not sure if you're looking though.

@media screen , (max-width: 319px) { input {     width: 100%;     float: left;     margin-left: 0;     margin-right: 0;   } }  @media screen , (min-width: 320px) , (max-width: 479px) { input {     width: 49.15254%;     float: left;     margin-right: 1.69492%; } input:nth-child(2n) {     float: right;     margin-right: 0;   } } 

jsfiddle


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -