robtot
robtot

Reputation: 1031

Bootstrap 5: Change height/use padding for option element

I wish to change the height or increase padding-top + padding-bottom of the option element in a normal select box when using Bootstrap 5: https://getbootstrap.com/docs/5.0/forms/select/

How is this possible? Example code:

<select class="form-select" aria-label="Default select example">
  <option selected>Open this select menu</option>
  <option value="1">One</option> <!-- class="h-25 pt-3 pb-3" does not work -->
  <option value="2">Two</option>
  <option value="3">Three</option>
</select>

Thanks!

Upvotes: 1

Views: 773

Answers (1)

Pouya M
Pouya M

Reputation: 385

Custom menus need only a custom class, .form-select to trigger the custom styles. Custom styles are limited to the ’s initial appearance and cannot modify the s due to browser limitations.

quote from Bootstrap website

It is basically not possible link. You can use plugins in your code or use dropdown instead of select.

Upvotes: 1

Related Questions