.groupButton { background-color: rgba(255, 255, 10, 0.3); position: absolute; width: 30px; text-align: center; right: -17px; cursor: pointer; font-size: 13px; padding: 2px; border: 1px solid black; border-bottom-left-radius: 5px; border-top-left-radius: 5px; transition: 0.5s; } .groupButton:hover { width: 60px; transition: 0.5s; } .onOffGroupButton, .onOffGroupButton.buttonOn { border: 1px solid blue; background-color: rgba(255, 255, 10, 0.3); padding: 5px; cursor: pointer; border-radius: 5px; color: black; position: relative; margin-left: auto; margin-bottom: 10px; width: 220px; font-weight: bold; text-align: center; } .onOffGroupButton.buttonOff { border: 1px solid black; background-color: rgba(8, 8, 8, 0.3); padding: 5px; cursor: pointer; border-radius: 5px; color: black; position: relative; margin-left: auto; margin-bottom: 10px; width: 220px; font-weight: bold; text-align: center; }