I am currently working on a project that involves creating a Modal Layer using CSS. I have successfully implemented the modal layer, but now I need to figure out how to change the width from the default 400px to something else when I open it with Javascript. Can anyone guide me on how to achieve this?
<div id="openModal" class="modalDialog">
<div>
<a href="#close" title="Close" class="close">X</a>
<video width="640" height="480" id="notes_video" controls fullscreen>
<source src="video/Opening.webm" type="video/webm">
<track kind="subtitles" src="opening.vtt" srclang="de"></track>
Your browser does not support the video tag.
</video>
</div>
</div>
CSS-Code:
.modalDialog > div {
width: 400px;
}
Your assistance would be greatly appreciated. Thank you.