JSFiddle - React, Tailwind, and code Playground

by thayes

HTML

<div id="container">
    <div id="offset">
        <div id="slider">
        </div>                        
    </div>
</div>

CSS

#container {
    border: 1px solid blue;
    background: #DADADA;
    font-weight: bold;
    color: #2F3E46;
    text-shadow: none;
    border-radius: 8px;
    position: relative;
    display: inline-block;
    padding: 0;
    margin: 0 2% 0 20px;
    top: 4px;
    width: 200px;
    height: 32px;
    overflow: hidden;
    margin-left: 0;
}

#offset {
    margin-left: 50%;
    position: absolute;
    top: 1px;
    height: 100%;
    width: 50%;
}

#slider {
    border: 1px solid red;
    background: white;
    font-weight: bold;
    text-shadow: none;
    border-radius: 8px;
    box-shadow: none;
    display: block;
    text-align: center;
    cursor: pointer;
    position: relative;
    margin: .5em 5px;
    padding: 0;
    position: absolute;
    z-index: 10;
    top: 50%;
    width: 28px;
    height: 28px;
    margin-top: -15px;
    margin-left: -15px;
    z-index: 20;
    width: 101%;
    height: 32px;
    margin-top: -18px;
    margin-left: -101%;
    left: 100%;
}