There is a form. Now the form fields are rubber, and change size when the width of the window changes. But the problem is that the width of the block .input_block = (100% - 40px) / 2. Because of this, we have different field widths. How to make the same width of the fields, leaving the width of the label (it is different and left and right margins)?
The .input_block block must remain. Because of him and can not figure out how to do. If it were not, then the field width could be easily calculated (from the width of the form, subtract the width of the right and left label and divide by 2).
form { font-size: 0; line-height: 0; letter-spacing: -1px; } form .input_block { display: inline-block; vertical-align: top; width: calc((100% - 60px)/2); } form .input_block:nth-child(2n) { margin: 0 0 20px 40px; } form .input_block:last-child { margin: 0 0 0 40px; } form label { display: inline-block; vertical-align: top; font-size: 14px; line-height: 20px; letter-spacing: normal; } form .input_block:nth-child(2n-1) label { width: 63px; } form .input_block:nth-child(2n) label { width: 77px; } form input { box-sizing: border-box; display: inline-block; vertical-align: top; } form .input_block:nth-child(2n-1) input { width: calc(100% - 63px); } form .input_block:nth-child(2n) input { width: calc(100% - 77px); } <form action="#" method="php"> <div class="input_block"> <label>ΠΠΌΡ: </label> <input type="text" name="login"> </div> <div class="input_block"> <label>Π€Π°ΠΌΠΈΠ»ΠΈΡ: </label> <input type="text" name="password"> </div> <div class="input_block"> <label>E-mail: </label> <input type="text" name="login"> </div> <div class="input_block"> <label>Π’Π΅Π»Π΅ΡΠΎΠ½: </label> <input type="text" name="password"> </div> </form>