Konstantin Bodnia
Konstantin Bodnia

Reputation: 1513

position: relative, overflow: hidden parent and absolute child

Okay, here's an example: http://jsfiddle.net/jGLvk/405/

If you hover the 9012 menu, you will have sliced dropped down submenu that is absolute. Remove position:absolute, or overflow:hidden from any of its parents: you will have normal working dropdown menu.

“Overflow-y:visible” will just generate a scrollbar instead of showing menu.

Please help me! I need a regular superfish dropdown menu in such tricky ancestors.

Thank you!

Upvotes: 7

Views: 3216

Answers (1)

Paulo R.
Paulo R.

Reputation: 15609

Here, take a look. I'm not sure what the overflow:hidden is for, but would it work applied to the div uland not the div? If so, well do it, and set the position: relative on the div. Take a look -> http://jsfiddle.net/jGLvk/407/

Since the absolutely positioned elements becomes relative to the div, it ignores the overflow:hidden; set on the ul.

Upvotes: 5

Related Questions