Simon Dragsbæk
Simon Dragsbæk

Reputation: 2399

Windows 8 input[type="range"] styling

I'm trying to style my sliders on Windows 8 (IE 10) they have some standard styling and I can't find their styling within the documentation, anyone else who have had to style the slider (I just want to change the color)

See picture below to see Windows 8 standard styling (IE 10):

Slider image win8 design

I want to change the purple element of the slider to, for instance, red. I'm not posting code because I can't find out where to look for it, not even in the inspect mode in my Visual Studio debug screen.


In addition to this question i wanna ask if you know how to style the select controls i can manage all the other but the blue one on the picture below

select & options

Upvotes: 4

Views: 2222

Answers (2)

Simon Dragsbæk
Simon Dragsbæk

Reputation: 2399

The solution have been found! The fill in the controler is set by this new -ms- (IE) property

FX this would make it black

input[type="range"]::-ms-fill-lower{background-color:#000;}

EDIT*(

input[type="range"]:hover::-ms-fill-lower{background-color:#fff;}

)

More controls are found by building THIS following links content on a windows 8 and visual studio 2012 edition.

Upvotes: 6

Martin
Martin

Reputation: 11041

Simon's answer doesn't work unless you put a selector in front of it:

#sliderId::-ms-fill-lower { background-color: #ff0000; }
#sliderId::-ms-fill-upper { background-color: #0000ff; }

Reference

Upvotes: 0

Related Questions