JSFiddle - React, Tailwind, and code Playground

by luka kupunia

HTML

<div class="box">
  <div class="box1"></div>
</div>
<div class="box2">
  <div class="box3">
    <div class="box4"></div>
  </div>
</div>

CSS

body {
}
* {
  box-sizing: border-box;
}
div.box {
  width: 100%;
  height: 40px;
  background : grey;
  position: fixed;
  top:  0;
}
div.box1 {
  width: 50px;
  height: 200px;
  background : black;
  position: absolute;
  z-index: 1000;
  top: 0;
  left: 0;
}
div.box2 {
  width: 100%;
  height: 160px;
  background : #eee;
  position: relative;
}
div.box3 {
  width: 50px;
  height: 50px;
  background : red;
  position: absolute;
  top: 0;
  left: 0;
}
div.box4 {
  width: 20px;
  height: 20px;
  background: yellow;
  position: absolute;
  z-index: 3;
}