http://jsbin.com/nuzazefuwi/1/edit?html,css,output
In the link above the textbox should have only 10px instead it has a width of 152px
.
This is the code:
.input {
width: 100%;
box-sizing: border-box;
}
.cont {
padding: 2px;
}
.main {
position: absolute;
border: 1px solid black;
min-width: 15px;
}
<div class='main'>
<div class='cont'>
<input type="text" class='input' />
</div>
</div>
<br/>
<br/>
<br/> the textbox should have 10px
It looks like the input starts to get the correct width only after .main
min-width
is greater than 156px.