* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;

}

.outcontainer {
    position: relative;
    display: inline-block;
    height: 26px;
    width: 60px;
    top: 8px;
}

.container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 26px;
    width: 65px;
    display: block;
}

.container .toggle {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 26px;
    background: #898989;
    border-radius: 15px;
    transition: 0.3s;
}

.container .toggle .toggle-button {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.container .toggle.active {
    background: #1A733F;
    /*cornflowerblue*/
}

.container .toggle.active .toggle-button {
    left: 17px;
}

.container .toggle::after {
    content: "OFF";
    position: absolute;
    left: 42px;
    font-size: 9px;
    font-family: Arial, Helvetica, sans-serif;
    margin-left: 1px;
    margin-top: 9px;
}

.container .toggle.active::after {
    content: "ON";
}