Is there a way to maintain the colors while printing my HTML page to PDF?
<table class="table table-responsive table-striped">
<thead>
<tr>
<th>Elev</th>
<th>Session navn</th>
<th>Spørgsmål</th>
<th>Svar</th>
<th>Rigtigt svar</th>
<th>Dato</th>
</tr>
</thead>
<tbody>
<tr class="success">
<td>test</td>
<td>testing</td>
<td>test</td>
<td>test</td>
<td>test</td>
<td>test</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5">
<button class="btn btn-block btn-default" onclick="deactivate">Deaktiver</button>
</td>
<td style="text-align:right">#3</td>
</tr>
</tfoot>
</table>
I fetch data from the database and display it in the table above. Rows are colored green if correct and red if wrong. This works well on the webpage but not when printed. How can I solve this issue?