I am facing a problem background color in a tablerow.
<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 working fine
Here is Output
Problem
When I want to take print of this page. background-color
of the row is not shown.
Can anyone please help me?
First on the File menu, click Options > on the Display menu, click to select the Print background colors and images check box under Printing Options > and then click OK. Hope above suggestion helps you and good luck! Was this reply helpful?
HTML | <tr> bgcolor Attribute The HTML <tr> bgcolor Attribute is used to specify the background color of a table row. It is not supported by HTML 5. Attribute Values: color_name: It sets the background color by using the color name.
that is because you have set the background color, and then overwritten it by using the background shorthand…. either move the background-color call after the background shorthand, or add it TO the shorthand… the browser interprets your current code like this…
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With