.slidecontainer { width: 95%; /* Width of the outside container */ height: 25px; /* make it high enough for knobs not to overlap */ margin-left: 5%; margin-top: 5px; margin-bottom: 5px; } .slider { /* Bar in which the slider handle can be moved */ -webkit-appearance: none; width: 85%; /* Width of slider within slidecontainer */ margin-top: 5px; height: 10px; /* Specified height */ border-radius: 5px; /* Radius makes the edges round */ background: linear-gradient(to right, #007bff 0%, #007bff 0%, #d3d3d3 0%, #d3d3d3 100%); outline: none; opacity: 0.7; /* Set transparency as default (for mouse-over effects on hover) */ -webkit-transition: .2s; /* 0.2 seconds transition on hover */ transition: opacity .2s; z-index: -1; /* make sure slider bar is below knobs */ } .slider:hover { opacity: 1; /* Fully shown on mouse-over (no transparency) */ } /* The slider handle (use webkit (Chrome, Opera, Safari, Edge) and moz (Firefox) to override default look) */ .slider::-webkit-slider-thumb { -webkit-appearance: none; /* Override default look */ appearance: none; width: 10px; /* Set a specific slider handle width */ height: 25px; /* Slider handle height */ border-radius: 20%; /* Radius makes the slider handle round */ background: #007bff; cursor: pointer; /* Cursor on hover */ } .slider::-moz-range-thumb { width: 10px; /* Set a specific slider handle width */ height: 25px; /* Slider handle height */ border-radius: 20%; /* Radius makes the slider handle round */ background: #007bff; /* Blue background (Javascript color name) */ border-color: #007bff; cursor: pointer; /* Cursor on hover */ } .slider_table { width: 90%; border: 0px; margin-left: auto; margin-right: auto; }