Fix Modal Dialog Size in SharePoint 2010

I’ve been using Kyle Schaeffer’s V5 Master Page as a pretty good starter template for a lot of my stuff recently. But I kept running across an issue. My modal dialog boxes weren’t being sized correctly. So upon further investigation, I realized it was just a bit of CSS that was being applied to dialogs where it shouldn’t be. I’m not sure if it was my fault, or something in the original file. So at the end of my CSS file I put the following code and everything works great!


/* fix the modal to resize correctly

********************************************************** */

.ms-dialog body #s4-workspace {padding:0px;overflow:auto !important;}

.ms-dialog body #s4-ribbonrow {position:relative;}

.ms-dialog #isb-wrapper {margin:0px;}

About bentedder

Ben Tedder is a front-end web developer. He loves WordPress, SharePoint, and Drupal, along with jQuery, CSS, and good 'ol HTML. +Ben Tedder on Google or follow @bentedder

Comments

I try to respond personally, but things get busy sometimes :)
  1. Josh says:

    This did it with a little tweak:

    .ms-dialog body #s4-workspace {
    padding: 0px !important;
    overflow: auto !important;
    }
    .ms-dialog body #s4-ribbonrow {
    position: relative !important;
    }
    .ms-dialog #isb-wrapper {
    margin: 0px !important;
    }
    .ms-dlgContent {
    overflow: hidden;
    }
    .ms-dlgFrame {
    overflow: hidden;
    }

Join the discussion!