我想要一個複選框和文本輸入,他們都將在一行中,文本輸入是響應。我嘗試顯示行內塊,它的工作,但我不能使文本輸入填充寬度100%的屏幕的其餘部分,它會下降,爲什麼?顯示內聯塊不能使用寬度100%
https://jsfiddle.net/shk4v0ep/
<div>
<div class="left-wrap">
<input type="checkbox" value="others" />
<label>Others</label>
</div>
<input type="text" value="" />
</div>
.left-wrap {
display: inline-block;
}
input[type="text"] {
display: inline-block;
//width:100%; how to make the input to fill till the rest of the screen
}