Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 657
Konstantin Bodnia Avatar asked Jul 03 '12 21:07

Konstantin Bodnia


1 Answers

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.

like image 134
João Paulo Macedo Avatar answered Sep 30 '22 11:09

João Paulo Macedo