function printDiv(elmid) { 
var divContents = document.getElementById(elmid).innerHTML; 
var a = window.open('', '', 'height=600, width=800'); 
a.document.write('<html><title>Print</title>'); 
a.document.write('<body style="padding:10px"><style>.text-white{ color:black;} table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #dddddd; }</style>'); 
a.document.write(divContents); 
a.document.write('</body></html>'); 
a.document.close(); 
a.print(); 
} 
