Bootstrap selectpicker search box font size

9.9k views Asked by At

Is it possible to change font size of the search box in Bootstrap select?

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<select class="selectpicker" data-live-search="true">
    <option>Option 1</option>
    <option>Option 2</option>
</select>

enter image description here

3

There are 3 answers

0
Dragomir Kolev On BEST ANSWER

Bootstrap-Select generates some HTML for you, so the thing you want is to inspect the HTML and then write some CSS to override the attributes given by the library.

CSS:

.bs-searchbox > input {
  font-size: 20px;
}

This should work for you. Hope this answers your question.

0
AudioBubble On

Do you mean like this?

.selectpicker{
  font-size: 15px !important;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<select class="selectpicker" data-live-search="true">
    <option>Option 1</option>
    <option>Option 2</option>
</select>

0
Phani Kumar M On

If you are using Bootstrap-Select, then you can use the following css:

.filter-option {
    font-size: 30px;
}