diff --git a/resources/assets/stylesheets/scss/courseware.scss b/resources/assets/stylesheets/scss/courseware.scss
index a8a523c57f7e2118f239d52218059d509a7ca7ba..ae3b841be92dddf0f1cc4be90987a47a836158bf 100755
--- a/resources/assets/stylesheets/scss/courseware.scss
+++ b/resources/assets/stylesheets/scss/courseware.scss
@@ -1791,7 +1791,8 @@ d i a l o g
     overflow-x: auto;
     display: flex;
     flex-direction: column;
-    padding: 0.2em;
+    padding: 3px;
+    margin: 3px;
     max-height: 98vh;
 
     .studip-dialog-header,
diff --git a/resources/vue/components/StudipDialog.vue b/resources/vue/components/StudipDialog.vue
index 0f62f03bec73107a90b1b8ed943b8f28041c7485..b248bb64aab3958abddca8f5b47ed1c98299fafe 100755
--- a/resources/vue/components/StudipDialog.vue
+++ b/resources/vue/components/StudipDialog.vue
@@ -97,6 +97,7 @@
 import { FocusTrap } from 'focus-trap-vue';
 import VueResizeable from 'vrp-vue-resizable';
 let uuid = 0;
+const dialogPadding = 3;
 
 export default {
     name: 'studip-dialog',
@@ -191,10 +192,10 @@ export default {
             }
         },
         dialogWidth() {
-            return this.currentWidth ? this.currentWidth + 'px' : 'unset';
+            return this.currentWidth ? (this.currentWidth - dialogPadding * 4) + 'px' : 'unset';
         },
         dialogHeight() {
-            return this.currentHeight ? this.currentHeight + 'px' : 'unset';
+            return this.currentHeight ? (this.currentHeight - dialogPadding * 4) + 'px' : 'unset';
         },
         contentHeight() {
             return this.currentHeight ? this.currentHeight - this.footerHeight + 'px' : 'unset';