JSFiddle - React, Tailwind, and code Playground

by joplomacedo

HTML

<div class="sidebar">
    
    
    <div class="helper">
        <div class="fixed"></div>
    </div>
    
    
</div>

CSS

.sidebar {
    position: relative;
    float: right;
    height: 300px;
    width: 90px;
    
    background: yellow;
}

.helper {
    position: absolute;
    top: 10px; left: 30px;
}

.fixed {
    position: fixed;
    width: 100px; height: 30px;
    
    background: indianred;
}




/*AUX STYLES*/

body {
    height: 1000px;
}