<style>
.container {
  width: 50px;
  height: 50px;
  background-color: cyan;
}

.float {
  float: left;
  width: 50px;
  height: 10px;
  background-color: green;
}

img {
  width: 10px;
  height: 20px;
  background-color: blue;
}
</style>
<div class=container style="text-indent: -50px"><div class=float></div><img></div>
<div class=container style="text-indent: -10px"><div class=float></div><img></div>
<div class=container style="text-indent: 0px"><div class=float></div><img></div>
<div class=container style="text-indent: -50px"><div style="float: right" class=float></div><img></div>
<div class=container style="text-indent: -10px"><div style="float: right" class=float></div><img></div>
<div class=container style="text-indent: 0px"><div style="float: right" class=float></div><img></div>
