• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Mutli-select dropdown box

Works quite nicely with a textbox - especially if I add a dropdown image doobrie.

Just got to work out how to show the listbox without moving the other content - I hate this CSS stuff!

Edit fiddle - JSFiddle


Edit: still would prefer a nice 'out the box' solution if anyone's come across one!

Absolute positioning is what you need.

Edit fiddle - JSFiddle
 
Works quite nicely with a textbox - especially if I add a dropdown image doobrie.

Just got to work out how to show the listbox without moving the other content - I hate this CSS stuff!

Edit fiddle - JSFiddle

  1. Wrap everything in a <div>, and give it position: relative;
  2. Give the <select> position: absolute; and left: 0; top: whatever-the-height-of-the-input-is;

Edit: still would prefer a nice 'out the box' solution if anyone's come across one!

Wouldn't we all :ohwell

Best thing I've read about <select> elements recently is this, which argues for just saying "to hell with the damn thing" and creating a new solution from scratch: https://medium.com/design-ux/bc190d62eff5
 
Well not quite 5 minutes by the time I'd added several of them in a .Net update panel, but now all working and client happy (for now...) :)

Thanks for the help all (esp. Bunk!)
 
Is that your name then, or someone you don't like ?

Boo

Andyw was a troll who flared briefly across the heavens of the forum in the summer of 2006, before crashing and burning as autumn came: Andyw's last post :)
 
I love the fact that AndyW's last post is in relation to a post by MF trying to bring peace and harmony to the board


oh how time changes everything!
 

Advertisers

Back
Top