2

I was following this tutorial to customize vertical input range, but I don't know how to achieve the same result with vertical input.

I tried to add transform: rotate(270deg); rule, but it didn't help.

jsfiddle

body {
    padding: 30px;
}
input[type=range] {
    /*removes default webkit styles*/
    -webkit-appearance: none;
    
    /*fix for FF unable to apply focus style bug */
    border: 1px solid white;
    
    /*required for proper track sizing in FF*/
    width: 5px;
    
    /* transform: rotate(270deg); */
}
input[type=range]::-webkit-slider-runnable-track {
    width: 5px;
    height: 300px;
    background: #ddd;
    border: none;
    border-radius: 3px;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: goldenrod;
    margin-top: -4px;
}
input[type=range]:focus {
    outline: none;
}
input[type=range]:focus::-webkit-slider-runnable-track {
    background: #ccc;
}
<input type="range">
Matt
  • 8,195
  • 31
  • 115
  • 225

1 Answers1

3

What you could do is just use the same code from the tutorial, but then add transform:rotate(90deg); and transform-origin: left; to input[type=range] to rotate it vertically.

cnrhgn
  • 703
  • 4
  • 18