nobleclem / jQuery-MultiSelect

Turn a multiselect list into a nice and easy to use list with checkboxes.
https://springstubbe.us/projects/jquery-multiselect/
MIT License
289 stars 216 forks source link

Options box not aligned with component #184

Closed aguevaracaprio closed 2 years ago

aguevaracaprio commented 2 years ago

When using the multiselect under a regular div, the options component is not aligned with the dropdown I've seen the demo code and it is not happening there, so not sure if my html is wrong or I'm missing something

<div id="wrapper" style='display: flex; align-items:stretch'>
</div>

That's the wrapper div

Screenshot from 2021-11-30 17-03-47 The options that are showed correspond to the Group 2 dropdown

aguevaracaprio commented 2 years ago

EDIT 1: I was able to solve the issue by removing position: absolute in the rule .ms-options-wrap > .ms-options

EDIT 2: Fix above didn't work as expected when having components below the dropdown. I added back the absolute position but removed left: 0 and seems to work

sam888k12 commented 2 years ago

Hi,

I am having the same issue but the fixes above did not work. I removed first left: 0 then position: absolute

This is what I have now. .ms-options-wrap > .ms-options { width: 100%; margin-top: 1px; margin-bottom: 20px; background: white; z-index: 2000; border: 1px solid #aaa; overflow: auto; visibility: hidden; } MultiSelectScreenshot

aguevaracaprio commented 2 years ago

Hey Sam. I'll recommend wrapping your select in a div component