snapappointments / bootstrap-select

:rocket: The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more.
https://developer.snapappointments.com/bootstrap-select/
MIT License
9.84k stars 2.72k forks source link

I want to style the top div and add margin to it, unable to do so #2865

Open KaviHarjani opened 4 months ago

KaviHarjani commented 4 months ago

A bug is a demonstrable problem that is caused by the code in the repository.

Guidelines for bug reports:

  1. Use the GitHub issue search. Check if the issue has already been reported.

  2. Check if the issue has been fixed. Try to reproduce it using the latest master or development branch in the repository.

  3. Provide environment details. Provide your operating system, browser(s), jQuery version, Bootstrap version, and bootstrap-select version.

  4. Create an isolated and reproducible test case. Create a reduced test case and include a link to a live example. Use this Plunker debugging template to share your isolated test cases.

KaviHarjani commented 4 months ago

Seems like the top div only has an option to add width in custom style using the data-width property For example

<div class="dropdown bootstrap-select"><select class="selectpicker" tabindex="-98">
<optgroup label="Picnic">
<option>Mustard</option>
<option>Ketchup</option>
<option>Relish</option>
</optgroup>
<optgroup label="Camping">
<option>Tent</option>
<option>Flashlight</option>
<option>Toilet Paper</option>
</optgroup>
</select><button type="button" class="btn dropdown-toggle btn-light" data-toggle="dropdown" role="combobox" aria-owns="bs-select-2" aria-haspopup="listbox" aria-expanded="false" title="Mustard"><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner">Mustard</div></div> </div></button><div class="dropdown-menu "><div class="inner show" role="listbox" id="bs-select-2" tabindex="-1"><ul class="dropdown-menu inner show" role="presentation"></ul></div></div></div>

I want to add style to the first div with class of dropdown bootstrap-select, how to go about that?