Resize the codemirror textraea editor according to the browser/window screen


I am following the link to make two div box. I have updated the approach suggested by . Initially it is 50% ratio to both div box size. After submitting the form it is not coming 50% ratio. See below output after submitting the form.

<div class="flex-container">
     <div class="column">   
          <textarea id="editor" ></textarea>
            var cm = CodeMirror.fromTextArea(document.getElementById('editor'),{mode:"text/x-java",lineNumbers:true})           
           // cm.setSize("800", "500");</script>
     <div class="column bg-alt">
            <textarea id="editor2" ></textarea> 
                var cm2 = CodeMirror.fromTextArea(document.getElementById('editor2'),{
                mode:"text/x-java"  });
                //cm2.setSize("800", "500")               

How to make my both div box size or codemirror textarea sizes fixed with the browser/desktop screen after the form submitted. Here is mine output after submitting the of above code: