<style>
.container {
  position: relative;
}

.inline_block {
  display: inline-block;
  width: 50px;
  height: 50px;
  background-color: green; 
}

.abs_pos {
  display: inline;
  position: absolute; 
  width: 50px;
  height: 50px;
  background-color: blue;
}
</style>

<div class=container>
  <div class=inline_block style="margin-inline-end: 10px;"></div>
  <div class=abs_pos></div>
</div>

<div class=container>
  <div class=abs_pos></div>
  <div class=inline_block style="margin-inline-start: 10px;"></div>
</div>

<div class=container style="height: 110px; writing-mode: vertical-lr;">
  <div class=inline_block style="margin-inline-end: 10px;"></div>
  <div class=abs_pos></div>
</div>

<div class=container style="width: 40px">
  <div class=inline_block></div>
  <div class=abs_pos></div>
  <div class=inline_block style="margin-inline-start: 10px;"></div>
</div>
