<div id="firstRow">
<div id="one">AAA</div>
<div id="two"><input style="width: 100%" type="search"></div>
<div id="three">AAAAAA</div>
</div>
I have three div
s.
- I want to float
div
with idone
to the left. The width ofdiv
one will depend on its content. - I want to float
div
three to the right with auto width depending also in its contents. - I want the
div
with id two to be in the taking up all remaining space.
I have made it with table but I want it with div
s
<table>
<tr>
<td id="one">AAAAAAAAAAAAAAAAAAAAA</td>
<td id="two"><input style="width: 100%" type="search"></td>
<td id="three">AAAAAA</td>
</tr>
</table>
table {
width: 100%;
}
#one
width: auto;
height: 20px;
background-color: red;
}
#two{
width: 100%;
height: 20px;
background-color: orange;
}
#three {
width: auto;
height: 20px;
background-color: green;
}