I've made a custom dropdown, here is the HTML:
<div class='dropdown'>
<div class='dropdownTitle'>Sort by<span class='select_arrow'></span></div>
<ul class='selectPanel'>
<li><input type='checkbox' id='allProducts'><label for='allProducts'>Name</label></li>
<li><input type='checkbox' id='Enterprise'><label for='Enterprise'>Date</label></li>
<li><input type='checkbox' id='Security'><label for='Security'>Popularity</label></li>
<li><input type='checkbox' id='Data'><label for='Data'>Rating</label></li>
</ul>
</div>
This is working fine in the most cases, but, if I float the dropdown, the element inside don't show as I would expected: the width of the panel don't grow when the labels are bigger. I've made a jsfiddle.
Can anybody explain to me why this is happening, and how to solve?
Thanks!