<script type="text/javascript">
function PrintDiv() {
var divToPrint = document.getElementById('divToPrint');
var popupWin = window.open('', '_blank', 'width=300,height=300');
popupWin.document.open();
popupWin.document.write('<html><head><link href="<?php echo $temp_url;?>/css/bootstrap.min.css" rel="stylesheet" media="print"><link href="<?php echo $temp_url;?>/css/default.css" rel="stylesheet" media="print"><link href="<?php echo $temp_url;?>/js/item-slider/initcarousel-1.css" rel="stylesheet" media="print"><link href="<?php echo $temp_url;?>/font-awesome/css/font-awesome.min.css" rel="stylesheet" media="print"><link href="<?php echo $temp_url;?>/js/select/fancySelect.css" rel="stylesheet" media="print"></head><body onload="window.print()">' + divToPrint.innerHTML + '</html>');
popupWin.document.close();
}
</script>
I am printing a perticular div area in php . but when i print the div all css is working only background css is not working. i tried to solve it with inline css but it's also not working.