How to do like this, as shown in the picture, but instead of div B , will input be located?
Container as a div , contains two divs .
div A , has a fixed width.
width div B , must be calculated as a percentage of the remaining free space.
it
<div style="width: 50%; background-color: green; margin: 0 auto; margin-top: 30px;"> <div style="float: left; height: 32px; width: 32px; border-radius: 5px 0 0 5px; background-color: red; "></div> <div style="height: 32px; width: 98%; border-radius: 5px 0 0 5px; background-color: #EEEEEE;"></div> </div> BUT if you use instead of DIV B , input, it is not calculated as a div
<div style="width: 50%; background-color: green; margin: 0 auto; margin-top: 30px;"> <div style="float: left; height: 32px; width: 32px; border-radius: 5px 0 0 5px; background-color: red; "></div> <input style="display: block; height: 32px; width: 98%; border-radius: 5px 0 0 5px; background-color: #EEEEEE;" type="text" size="20" placeholder="test"> </div> 
calc()function. Demo: jsfiddle.net/q0rksjsx/1 - Ihor Tkachuk