<!DOCTYPE html>
<style>
.a {
background-color: red;
width: 100px;
}
.b {
background-color: green;
display: inline-block;
width: 50px;
}
.c {
background-color: blue;
float: right;
width: 50px;
}
</style>
<div class="a">
<div class="b">foo</div>
<div class="c">bar</div>
</div>