Try this one
<div class="parent"> <div class="first">test</div> <div class="last">test2</div> </div>
Css
.parent { width: 100%; } .parent > .first { width: 300px; float: left; background-color: red; } .parent > .last { width: auto; float: right; background-color: blue; text-align:left }
example jsfiddle
user1423506
source share