'max-width' property doesn't work when child elements are floated?

Agoncange

New Member
I would like to set \[code\]max-width\[/code\] on a container element whose child elements are floated. How do I do it?By default, the \[code\]max-width\[/code\] property doesn't work in the given scenario (but \[code\]min-width\[/code\] does). Here's a pen that you can use to help me with the question.Look in the pen's preview pane (below the code) -- this is what I am talking about (\[code\].dropdown-menu\[/code\] class defines the relevant style):
BUsJb.png
But this is what it's supposed to look like (somewhat):
glcnK.png
 
Back
Top