JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
  <head>
    <title>Test</title>
    <style type="text/css">
* { overflow: visible; }
#precedence { float: right; height: 60px; width: 50px; background: pink; margin-bottom: -10px; margin-right: 20px; overflow: visible; }
#first { height: 50px; border: 1px dashed blue; background: white; margin-bottom: -10px; z-index: 100; position: relative; overflow: visible; }
#second { height: 50px; border: 1px dashed red; background: white; z-index: -1; overflow: visible; }
   </style>
  </head>
  <body>
    <div id="first">
      <div id="precedence"></div>
    </div>
    <div id="second"></div>
  </body>
</html>

CSS

/* This is the only change i made: (the original code is in the HTML section) */
#precedence {
    position: relative; 
}