div . .
:
label {
float: left;
}
div {
margin-left: 10em;
border-bottom: 1px solid black;
height: 1em;
}
<label>label:</label>
<div></div>
it will not stretch the entire width between the label and the right side, but you can make the label hide the bottom border (using a background color or something like that) and expand the div to the right as well as (without a margin).
If you want the correct semantics, you can only use the input, not the div, set it to "block" and fix the borders and background.
jishi source
share