Fill GAS ModalDialog box with HTML – no white ? Alternative?

Alan Wells in wrote, you can’t get rid of the white space around the edges of a dialog box. If you want to stay with Google products and want an alternative, you’d need to use an Apps Script Web App for your app.

He suggested creating the question box with a Web App rather than the triggered from the menu on the sheet.

My discovery of the nested CSS has fixed the problem of all the text appearing at the top.

I have FINALLY found a way to add a border on all sides of the html. Putting the border in the parent causes it to display on the top and left. Putting it in the child makes it display on the top, bottom, and left. The bottom border is in the middle of the green square – not at the bottom.

The trick was to decrease the size of the parent div from 100% to 97%. I tried 99% and 98% also. The width of your border may affect how much you have to decrease.

       #parent {
         background-color: #99ec46;
         font-family:Georgia, Cambria, Times New Roman, Times, serif;
         font-size: 100%;
         height: 97%;
         margin: auto; 
         padding: 0;
         position: fixed;
         width: 97%;
       #child {
         border: 5px solid #58a30d; 
         border-radius: 10px; 
         display: table-cell;
         padding: 55px 55px;
         vertical-align: middle;

Thanks also to Clark Lind in googlegroups for suggesting using slides instead of spreadsheet. Slides is also limited to displaying html with showModalDialog.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top