Monday, 15 March 2010

html - Centering a Popup Modal with Responsive Height/Scroll -



html - Centering a Popup Modal with Responsive Height/Scroll -

ok, i'm building popup our site. need centered on screen, max width , max-height values set it's never 100% of screen. want show scrollbar when applicable y-axis.

i suspect issue lies using display: table modal, doing modal fits height of kid elements within it. i'm guessing has conflict weird combination of max-height, overflow: auto, etc. i'm trying use. suggestions much appreciated.

here demo sass/markup. if resize browser short, can see how doesn't set scroll instead puts edges of box outside of screen.

http://codepen.io/heatherthedev/pen/deauy

add property .popup css . overflow-y: auto;

this should solve scroll in div issue. resizing, can invoke method $(window).resize() when user scroll pane or view.

html css popup popupwindow

No comments:

Post a Comment