Problem
I am using Bootstrap 3 and have the same problem with an auto overflow div container. It contains a drop-down menu that should pop out of the container.
Decision
The solution is to set the position: fixed in the drop-down list, and then calculate the coordinates using jQuery on click. Coordinates are calculated using offset (), so its relation to the document window instead of the parent elements.
This solution probably also works for overflow: hidden containers.
CSS
.somecontainer .dropdown-menu { position:fixed; }
JQuery
$(".somecontainer .dropdown").on('click', function() { $(this).find('.dropdown-menu').css('top',$(this).offset().top); $(this).find('.dropdown-menu').css('left',$(this).offset().left); });
Optionally add this to hide the drop-down menu when resizing the window:
$( window ).resize(function() { $('.somecontainer .dropdown-menu').parent().removeClass('open'); });
source share