For case two you can also set margin-left:auto for inner div in order to move it to the right. While text inside the inner div is already aligned to right. so this hacks works like a charm
margin-left:auto