Once the submit button is clicked on the initial output page, the CSS styling disappears and only a simple default form page is displayed. This does not meet my requirements. Using inline CSS allows it to work, but external CSS does not. Can someone please assist me? I have attached the code as well as the current output and the desired output.
HTML CODE
<div id="parent">
<div class="col-md-11 mx-auto">
<div class="main-title text-center mb-3">RELIEVING LETTER</div>
<div class="form-row mb-2">
<div class="col-md-2">
<label class="heading" for="validationDefault02">Date:-</label>
</div>
<div class="col-md-3">
<b><label for="" id="rlvRDate">Resign</label></b>
</div>
</div>
<div class="form-row mb-2">
<div class="col-md-2">
<label class="heading" for="validationDefault02">Name:-</label>
</div>
<div class="col-md-3">
<b><label for="" id="rlvFullname">Fullname</label></b>
</div>
<div class="col-md-2">
<label class="heading" for="validationDefault02">Emp Code:-</label>
</div>
<div class="col-md-3">
<b><label for="" id="rlvEmpID">EmpID</label></b>
</div>
</div>
</div>
<div class="col-lg-12 mx-auto">
<hr class="hr-line" />
</div>
<div class="col-md-11 mx-auto mb-2" id="rlv-ltr">
<div class="row mb-5">
<p>Dear <b><label for="" id="rlvFirstName">firstName</label></b>,</p>
<div class="col-md-11">
<p>
This is to inform you that we are accepting your resignation dated <b><label for=""
id="rlvRDate1">ResignDate</label></b> and officially releasing you on <b><label for=""
id="rlvLastDate">RelieveDate</label></b>.
</p>
<p>
Please complete all transition process before your last
working date.
</p>
<p>
Thank you so much for all your contribution. We wish you all
the best in your next endeavors.
</p>
</div>
<div class="col-md-11">Thank You.</div>
</div>
<div class="col-lg-12 mx-auto">
<hr class="hr-line" />
</div>
</div>
</div>
<div class="row">
<input type='button' class="btn btn-success btn-sm mx-auto" value='Submit' onclick='myApp.printDiv()' />
</div>
JS CODE
var myApp = new function () {
this.printDiv = function () {
// Store DIV contents in the variable.
var div = document.getElementById('parent');
// Create a window object.
var win = window.open(''); // Open the window. Its a popup window.
win.document.write(div.outerHTML); // Write contents in the new window.
win.print(); // Finally, print the contents.
}
}