How can I change the size of bootstrap slider?

Viewed 9834

Jsfiddle link is https://jsfiddle.net/gzp0pcot/

I am using Bootstrap slider from

https://github.com/seiyria/bootstrap-slider

I tried to change it using css but it didn't work perfectly.

How can I change the slider width and height ?

I want the final size to be almost 4 times than the current size.

I used the inspector to change following css code:

.slider.slider-horizontal .slider-track {
    height: 30px;
    width: 200%;
    margin-top: -5px;
    top: 50%;
    left: 0;
}

Above I changed height and width value, it increases size but 200% doesn't make sense and is not working properly.

3 Answers

I have the same problem, but need distinct sizes in same site. My solution was add an ID to this element, and then add on css the id:

#MYSliderID.slider.slider-horizontal {
    width: 80px;
    height: 20px;
  }
<div class='col-sm-4 col-md-1'>  <input  id='MyInputID' type='text'  data-slider-min='0'  data-slider-max='10' data-slider-step='0.05'data-slider-value='0'  data-slider-id='MYSliderID'     />             
                    

Related