I look at example of dropdown menu here. Here is simplified jsfiddle example. I want to build my own styled HTML element base on it. All it’s ok. But in my implementation I need to wrap <ul class="dropdown">...</ul> with div styled with the CSS like this:
border: 2px solid green;
overflow: auto;
And in this case the ul with submenu stratch this div (as I understand) and that’s why the scrollbars appeared. Here is simplified jsfiddle example.
But if use the following css for outer div – all is ok:
border: 2px solid green;
height: 35px;
Could you help me to understand – why I have problems with “overflow:auto” case?
TIA!
You don’t want to give the container an overflow that is not visible, since that will hide your drop-down. Further, there’s a lot of floating going on, that can now be
inline-blockwith IE8+ support.I forked your Jsfiddle and applied the CSS fixes at the bottom of the CSS Section. Is this what you’re looking for: http://jsfiddle.net/rgthree/VFZRB/