JSFiddle - React, Tailwind, and code Playground

HTML

<p>All the following .test containers have a .fixed child.</p>

    <div id="test-1" class="test">
      <pre><code>#test-1 {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
}</code></pre>

      <a class="fixed">.fixed Test 1</a>
    </div><!-- #test-1 -->

    <div id="test-2" class="test">
      <pre><code>#test-2 {
  /*position: relative;*/
  border-radius: 5px;
  overflow: hidden;
}</code></pre>

      <a class="fixed">.fixed test 2</a>
    </div><!-- #test-2 -->

    <div id="test-3" class="test">
      <pre><code>#test-3 {
  position: relative;
  /*border-radius: 5px;*/
  overflow: hidden;
}</code></pre>

      <a class="fixed">.fixed test 3</a>
    </div><!-- #test-3 -->

    <div id="test-4" class="test">
      <pre><code>#test-4 {
  position: relative;
  border-radius: 5px;
  /*overflow: hidden;*/
}</code></pre>

      <a class="fixed">.fixed test 4</a>
    </div><!-- #test-4 -->

CSS

.test {
  padding: 0 1em;
  border: solid 1px #333;
  margin-bottom: 1em;
  background: #efefef;
}

#test-1 {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
}

#test-2 {
  /*position: relative;*/
  border-radius: 5px;
  overflow: hidden;
}

#test-3 {
  position: relative;
  /*border-radius: 5px;*/
  overflow: hidden;
}

#test-4 {
  position: relative;
  border-radius: 5px;
  /*overflow: hidden;*/
}

.container {
  background: #ccc;
}

.fixed {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 3em;
  height: 3em;
  padding: 1em;
  color: #fff;
  background: #f00;
}

#test-2 .fixed {
  right: 6em;
}

#test-3 .fixed {
  right: 12em;
}

#test-4 .fixed {
  right: 18em;
}