html - Input-type range with custom css - thumb not showing correct in IE -
my web page looks in other browsers ie. here thumb of range sliders "cut off".
my code here:
https://jsfiddle.net/t1pw9rh2/
html:
<form action="url-link-here" method="post"> <span id="mydiv">100</span> <input class="input-range" id="sizeid" onchange="test()" oninput="test()" type="range" name="size" value="100" min="5" max="250" step ="5"> </form>
css:
input[type=range] { -webkit-appearance: none; margin: 10px 0; width: 100%; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 10px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #fff; border-radius: 1px; border: 1px solid #39404d; } input[type=range]::-webkit-slider-thumb { box-shadow: 0px 0px 0px #000000; border: 1px solid #39404d; height: 28px; width: 16px; border-radius: 2px; background: #fff; cursor: pointer; -webkit-appearance: none; margin-top: -10px; } input[type=range]:focus::-webkit-slider-runnable-track { background: #fff; } input[type=range]::-moz-range-track { width: 100%; height: 10px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #fff; border-radius: 1px; border: 1px solid #39404d; } input[type=range]::-moz-range-thumb { box-shadow: 0px 0px 0px #000000; border: 1px solid #39404d; height: 28px; width: 16px; border-radius: 2px; background: #fff; cursor: pointer; } input[type=range]::-ms-track { width: 100%; height: 10px; cursor: pointer; animate: 0.2s; background: transparent; border-color: transparent; color: transparent; } input[type=range]::-ms-fill-lower { background: #fff; border: 1px solid #39404d; border-radius: 4px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-fill-upper { background: #fff; border: 1px solid #39404d; border-radius: 4px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-thumb { box-shadow: 0px 0px 0px #000000; border: 1px solid #39404d; height: 28px; width: 16px; border-radius: 2px; background: #fff; cursor: pointer; } input[type=range]:focus::-ms-fill-lower { background: #fff; } input[type=range]:focus::-ms-fill-upper { background: #fff; }
javascript:
function test(){ var mydivelem = document.getelementbyid("mydiv"); var sizerange= document.getelementbyid("sizeid"); mydivelem.innerhtml = sizerange.value; }
my web page can seen here:
http://negoto.azurewebsites.net/
how fix css thumb looks in ie?
best, peter
i found answer here. http://brennaobrien.com/blog/2014/05/style-input-type-range-in-every-browser.html mentions cant style thumb bigger track in ie.
Comments
Post a Comment