I am using chosen with bootstrap responsive. when the browser window gets resized the chosen select elements remain the same size. has anybody implemented a solution for this?
I did a quick css hack on it for one of my projects - https://gist.github.com/4627725
Thanks very much.
Tested on Android, iPhone, iPad, IE, Firefox, Chrome and Safari. All work a treat.
Cheers
@benblodgett your fix worked great with a little modifications. thanks, brilliant.
As CSS with Bootstrap 3, you should add following lines to chosen.css file:
[class*="col-"] .chosen-container {
width:98%!important;
}
[class*="col-"] .chosen-container .chosen-search input[type="text"] {
padding:2px 4%!important;
width:90%!important;
margin:5px 2%;
}
[class*="col-"] .chosen-container .chosen-drop {
width: 100%!important;
}
UPDATED:
I recently worked with Foundation 5 and here is my update to make Chosen works with Foundation 5 (it is more simpler):
.columns .chosen-container, .column .chosen-container {
width: 100% !important;
margin-bottom: 1rem;
}
@datnguyen293 - could we maybe get that added to the original code? Cos that was a bugger for me - and now I found this, it REALLY helped! :+1:
Yes we can do bootstrap with chosen plugin. For tht u need to update ur css only.. if u want updated css for bootstrap purpose let me know..
On Wed 18 Jun, 2014 1:39 PM IST Andy wrote:
@datnguyen293 - could we maybe get that added to the original code? Cos that was a bugger for me - and now I found this, it REALLY helped! :+1:
Reply to this email directly or view it on GitHub:
https://github.com/harvesthq/chosen/issues/1004#issuecomment-46406958
Thanks @AnshuDahiya - I've already got it going myself - but I was just saying it would be a good idea to update the original BS hack for Chosen, so that it uses the latest code :) (I was using some code, that didn't respond when you resized the window - whereas with this code, it now does it perfectly =))
Yes, I think @youradds was right. If we can add these stuffs into Chosen's CSS that would be good. Other guys should not need to search for the solution and read through to this issue anymore.
Ok great..Â
Sent from Samsung Mobile
—
Reply to this email directly or view it on GitHub.
Works fu..ing loving great! Thanks @datnguyen293
Most helpful comment
As CSS with Bootstrap 3, you should add following lines to chosen.css file:
UPDATED:
I recently worked with Foundation 5 and here is my update to make Chosen works with Foundation 5 (it is more simpler):