Row table Background color does not appear when printing

I ran into a background color issue on the scoreboard.

<tr style="background-color:#999999"> <td width="204"> <strong>Opinion</strong></td> <td width="62"> <strong>Action</strong></td> <td colspan="4"><strong>Ratings</strong></td> <td width="54"><strong>Outlook</strong></td> <td width="93"><strong>Rating Type</strong></td> </tr> 

This code is working fine

Here is the conclusion

enter image description here

Problem

When I want to print this page. background-color line is not displayed.

enter image description here

Can anybody help me?

+5
source share
3 answers

add this to tr style

  <style> .row{ background-color:#999999; -webkit-print-color-adjust: exact; } </style> <tr class="row"> <td width="204"> <strong>Opinion</strong></td> <td width="62"> <strong>Action</strong></td> <td colspan="4"><strong>Ratings</strong></td> <td width="54"><strong>Outlook</strong></td> <td width="93"><strong>Rating Type</strong></td> </tr> 
+4
source

Try using

<table> <thead> <tr> <th></th> </tr> </thead> <tbody> <tr> <td></td> </tr> </tbody> <table>

for the table ...

and use below type css ..

 @media print { tr.vendorListHeading { background-color: #999999!important; -webkit-print-color-adjust: exact; }} @media print { .vendorListHeading th { color: white !important; }} 

Hope this helps ...

0
source

You can also click advanced settings in the print dialog box and select the Background Graphics check box.

0
source

Source: https://habr.com/ru/post/1237085/


All Articles