#right{
background: green;
width: 100%;
}
#left {
margin-top: 5px; /* to test if they intersect*/
background: red;
}
#container {
width: 800px;
}
<divid="container"><divid="left"> This div is as big as it's content</div><divid="right"> rest of space</div></div>