JSFiddle - React, Tailwind, and code Playground
HTML
<div id="a-div">
<div id="b-div"><div id="d-div"><span>d</span></div></div>
<div id="c-div"><span>c</span></div>
</div>
CSS
#a-div {
position: relative;
margin: 20px;
}
#b-div {
height: 100px;
width: 100px;
background-color: #555;
padding: 50px;
}
#c-div {
position: absolute;
height: 50px;
width: 200px;
top: 100px;
left: 100px;
background-color: #999;
}
#d-div {
height: 50px;
width: 50px;
background-color: #ddd;
text-align: center;
}
#c-div span {
margin: 21.5px;
line-height: 50px;
}
#d-div span {
margin: auto;
line-height: 50px;
}
.outlined {
outline: 10px solid steelblue;
}
JavaScript
$( '#b-div' ).bind( {
mouseenter: function () {
$( this ).addClass( 'outlined' );
},
mouseleave: function () {
$( this ).removeClass( 'outlined' );
}
} );