Не работает файл print.css в чем может быть проблема ?
function PrintElem(elem)
{
Popup($(elem).html());
}
function Popup(data)
{
var mywindow = window.open('', 'table', 'height=1000,width=1000');
mywindow.document.write('<html><head>');
mywindow.document.write('<link rel="stylesheet" type="text/css" media="print" href="/project/print.css">');
mywindow.document.write('</head><body ><table>');
mywindow.document.write(data);
mywindow.document.write('</table></body></html>');
mywindow.document.close(); // necessary for IE >= 10
mywindow.focus(); // necessary for IE >= 10
mywindow.print();
mywindow.close();
}
<input type="button" value="Печать" id="pr" onclick="PrintElem('#table')" />
@media print {
table {
background-color: red;
}
}
<table border="1" cellpadding="3" id="table" class="table">
<tbody><tr>
<th>First Name</th>
<th>Last Name</th>
<th>Points</th>
</tr>
<tr>
<td>Jill</td>
<td>Smith</td>
<td>50</td>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
<td>80</td>
</tr>
<tr>
<td>Adam</td>
<td>Johnson</td>
<td>67</td>
</tr>
</tbody></table>
<br />
<br />
<button>Print me</button>