1

Im using several select box in my form and integrated the combobox plugin

https://github.com/danielfarrell/bootstrap-combobox

the problem of this plugin the dropdown menu is not 100% width

enter image description here

i fixed it with this and its working fine

<style>

.dropdown-menu
{
 width: 100%;
}

</style>


<select class="combobox">
  <option></option>
  <option value="PA">Pennsylvania</option>
  <option value="CT">Connecticut</option>
  <option value="NY">New York</option>
  <option value="MD">Maryland</option>
  <option value="VA">Virginia</option>
</select>

but right now one of my date-time select input is not working

how do i edit this css so it will efect select box with combobox class only

<style>

.dropdown-menu
{
 width: 100%;
}

</style>
1
  • Where is the HTML code using the dropdown-menu class? Are you using that class more often? Commented Aug 31, 2017 at 3:38

2 Answers 2

1

You can wrap all of the boxes in a container with a particular class and define it using the parent class. Ex:

<div class="xyz-class"><select class="combobox"></select></div>

Now you can define this using css using

.xyz-class .dropdown-menu { width: 100% }
Sign up to request clarification or add additional context in comments.

1 Comment

Happy to help. Feel free to ask if you have more questions.
1

What element(s) has the class dropdown-menu?

You need to find something to differentiate the combobox drop down elements from the other select elements you don't want styled.

For example you could add a class such as dateTimeSelect to your date-time select elements and change your CSS style rule to:

.dropdown-menu:not(.dateTimeSelect)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.