mysociety / jquery-multi-select

Converts <select multiple> elements into dropdown menus with checkboxes
https://www.mysociety.org/
Other
24 stars 18 forks source link

Config option to stop menu extending outside a parent element #5

Closed zarino closed 8 years ago

zarino commented 8 years ago

If positionMenuWithin is specified, the width of the menu is artificially constrained, such that it does not extend outside the bounds of the positionMenuWithin element when it is shown.

This was the first test that really required CSS styles (for the width and position calculations) so it necessitated a tidying up of the CSS files in /demo.

zarino commented 8 years ago

The way that the options wrap onto multiple lines is a bit ugly:

screen shot 2016-10-12 at 17 17 30

Should be fairly easy to fix with absolutely-positioned (or negative left-margined) input and padding-left on the labels.

Fixed!

screen shot 2016-10-13 at 12 18 32

zarino commented 8 years ago

@davea or @dracos: Could you give this a review?