Reputation: 55729
HTML
<div id="container">
<div id="first">Some text in the first div</div>
<div id="second"><input type="text" value="Some text in the input" /></div>
</div>
</div>
CSS
#first{
width:100px;
background:red;
float:left;
}
#second{
background:blue;
}
#container{
overflow:hidden;
}
#container:after{
clear:both;
content:"";
height:0px;
width:0px;
visibility: hidden;
}
Fiddle: http://jsfiddle.net/6GBts/2/
Upvotes: 0
Views: 33
Reputation: 40970
You might want this
#second{
background:blue;
overflow:hidden
}
input{
width:100%
}
Upvotes: 1