js: Move dialogue-box sizing and positioning from JavaScript to CSS

This has the advantage that if you resize the window while a dialogue
box is active, the dialogue box adjusts itself accordingly.
This commit is contained in:
Ben Harris
2022-10-17 22:34:54 +01:00
parent c90d64f243
commit 49849e40ec
2 changed files with 3 additions and 3 deletions

View File

@ -184,9 +184,6 @@ function dialog_init(titletext) {
// Now create a form which sits on top of that in turn.
dlg_form = document.createElement("form");
dlg_form.id = "dlgform";
dlg_form.style.width = (window.innerWidth * 2 / 3) + "px";
dlg_form.style.top = (window.innerHeight / 10) + "px";
dlg_form.style.left = (window.innerWidth / 6) + "px";
var title = document.createElement("p");
title.className = "title";