I have a simple HTML range input component and I would like to divide the track to three different parts. I have a range of 0 to 75 in the component. I would like to style 0 to 25 as green, 26 to 50 as yellow and 51 to 75 as red irrespective of the input value, ie., the colors are constant. Is it possible to it? Here is the working jsfiddle
var p = document.getElementById("price"),
res = document.getElementById("result");
p.addEventListener("input", function() {
res.innerHTML = p.value;
}, false);
<div style="margin-top: 1em">
<h2>Price</h2>
0<input id="price" type="range" min="0" max="75" value="" />75
</div>
<p id="result"></p>