I'm having trouble repositioning and resizing a dialog box. I attempted to use the style tag, but it didn't have any effect. I want to permanently move it to a specific location.
The dialog box always opens in the same position, but I need to change its location and size. I tried using
style=" position:absolute; top/right"
without success. My goal is to have it open in the top right corner with a different size. How can I achieve this?
(function() {
var dialog = document.getElementById('arbeitsauftrag-window');
document.getElementById('arbeitsauftrag').onclick = function() {
dialog.show();
};
document.getElementById('arbeitsauftrag-exit').onclick = function() {
dialog.close();
};
})();
<dialog id="arbeitsauftrag-window" style="position:absolute; top:5px; left:5px;">
<button id="arbeitsauftrag-exit">Close Window</button>
</dialog>
<button id="arbeitsauftrag">Open Dialog Box</button>