I would like to set max-width on a container element whose child elements are floated. How do I do it?
By default, the max-width property doesn’t work in the given scenario (but min-width does). Here’s a fiddle that you can use to help me with the question.
Look in the fiddle’s preview pane — this is what I am talking about (.dropdown-menu class defines the relevant style):

But this is what it’s supposed to look like (somewhat):

These quotes should answer the question:
– via Smashing Magazine
So, your only options are
min-widthandwidth.