<style>
#main {
	width: 300px;
}

#inline-b {
	border: 1px solid red;
	display: inline-block;
	height: 100px;
}

</style>

<div id=main>first line with<div id=inline-b>shrink to fit</div>content</div>
