Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

White "background" on input range when using border radius

Tags:

html

css

You can find a screenshot of my problem here; While trying to style the range input I noticed that it has white corners. I can't seem to figure out why or how to remove them, I first thought it was an outline but setting outline to none did nothing. Here is a JSFiddle: http://jsfiddle.net/c1y0y7dj/

My CSS

input[type=range] {
    -webkit-appearance: none;

    width: 200px;
}
input[type=range]::-webkit-slider-runnable-track {
    width: 200px;
    height: 5px;
    background: #565656;
    border: none;
    border-radius: 3px;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #F06A00;
    margin-top: -5px;
}
input[type=range]:focus {
    outline: none;
}
input[type=range]::-moz-range-track {
    width: 200px;
    height: 5px;
    background: #ddd;
    border: none;
    border-radius: 3px;
}
input[type=range]::-moz-range-thumb {
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #F06A00;
}

input[type=range]::-ms-track {
    width: 200px;
    height: 5px;

    background: transparent;

    border-color: transparent;
    border-width: 6px 0;

    color: transparent;
}
input[type=range]::-ms-fill-lower {
    background: #373737;
    border-radius: 10px;
}
input[type=range]::-ms-fill-upper {
    background: #575757;
    border-radius: 10px;
}
input[type=range]::-ms-thumb {
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #F06A00;
}
input[type=range]:focus::-ms-fill-lower {
    background: #373737;
}
input[type=range]:focus::-ms-fill-upper {
    background: #575757;
}
like image 646
MexicanR Avatar asked Oct 15 '25 15:10

MexicanR


2 Answers

Try this css

input[type=range] {
    -webkit-appearance: none;
    width: 200px;
    background-color: transparent;
}
like image 89
Ruchit Patel Avatar answered Oct 17 '25 05:10

Ruchit Patel


Here is the solution

You should add to

input[type=range] {
    -webkit-appearance: none;
    width: 200px;
    background: transparent;
}
like image 21
Kicsi Viziló Avatar answered Oct 17 '25 04:10

Kicsi Viziló



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!