Please refer this script. Here i am not removing the style from div tag instead i am removing the height from the style and again adding same height to div tag.
<script type="text/javascript">
function PrintPanel() {
var panel = document.getElementById("<%=pnlPopup.ClientID %>");
var panelBody = document.getElementById("panelbodydiv");
panelBody.style.height = "";
var printWindow = window.open('', '', 'height=400,width=800');
printWindow.document.write('<html><head>');
printWindow.document.write('</head><body >');
printWindow.document.write(panel.innerHTML);
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(function () {
printWindow.print();
}, 500);
panelBody.style.height = "390px";
return false;
}
</script>