Search code examples
jquerypluginscentersimplemodal

SimpleModal not centering when opened


I'm using the SimpleModal jquery plugin. Everything works fine in FireFox but in all of the other browers the modal window isn't centered on the screen when it first opens. It appears that the top-left corner of the window is at the center of the screen. Once I close the window and then reopen it or if I resize the browser window, it's centered properly. Anyone have any idea why this is happening and how to fix it?


Solution

  • Okay, I figured it out. I had to set the width and/or height of the container. Setting containerCss, minHeight, minWidth, maxHeight, maxWidth did it.