I have this HTML:
.parent{
border: 1px solid;
width: 70%;
}
.title{
width: 50px;
}
.input {
}
<div class="parent">
<span class="title">title: </span>
<input class="input" name="title" type="text">
</div>
I need to set width: 100%;
for .input
element. But when I do that, being in the same line breaks .. I mean in that case both .title
and .input
will not be in the same line anymore. How can I keep them in the same line and also fill the whole width of their parent (.parent
)?
Note: There are some ways by using either flex
or calc()
.. but actually the most of my website's users use old browsers. anyway I'm looking for a approach which supports old browsers.