JSFiddle - React, Tailwind, and code Playground
by stellarloony
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dropdown</title>
<style>
.parent {
border: 5px dotted red;
height: 500px;
width: 500px;
display:flex;
justify-content: center;
align-items: start;
padding: 50px;
background-color: black;
}
.child {
border: 5px solid blue;
height: 100px;
width: 100px;
margin: 0 0 50px 50px;
background-color: midnightblue;
position: relative;
z-index: 10;
}
.child-hover {
position: absolute;
border: 3px solid green;
border-radius: 40px;
height: 60px;
width: 80px;
top: 0;
left: 90%;
background-color: green;
z-index: 9999 !important;
}
</style>
</head>
<body>
<div class="parent">
<div class="child">
<div class="child-hover">
</div>
</div>
<div class="child"></div>
</div>
</body>
</html>