javascript - JS print - CSS text color not showing -


i'm making invoice in html & css. goal after filling in, invoice gets printed. reason doesn't print css color of text. text black. other css styling works, font-family, font-size, font-weight ...

this original in html & css :

enter image description here

and printed :

enter image description here

the printing done js: window.print();

does know why css color isn't working?

edit: title placed in table id 'factuur':

<td id="factuurtitel">stukadoorwerken vanhees frank</td> 

the title has css:

#factuurtitel {     font-weight: bold;     font-size: 30px;     color: #194197;     text-align: center;     vertical-align: middle;     font-family: 'carrois gothic sc', calibri, sans-serif; } 

i have @media print :

@media print {     body * {         visibility: hidden;     }      #factuur, #factuur * {         visibility: visible;     }      @page {         margin: 0;     } } 

i've tried adding #factuurtitel { color: #194197; } @media print.

usually js print handles html content alone if want give stylings print, use separate media query print in css file:

 @media print    {       /* css goes here */    } 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -