function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
edoardo_spanoedoardo_spano 

CSS backgroun-color rgba is not working on PDF

Hi all,
I've built a visualforce page with renderAs="pdf".
Inside this page I want to insert a table which has cells with rgba background-color, because I need to set the opacity of the background.

This is the HTML:
<table class="riepilogo">
	<tbody>
		<tr>
			<td>Demolizioni rimozioni scavi e trasporti</td>
			<td>&#9679;</td>
			<td>15.719,40</td>
		</tr>
		....
	</tbody>
</table>

This is the CSS:
table.riepilogo tbody tr td {
	background-color: rgba(229, 106, 84, 0.1);
}

When I run the page, the cells background-color doesn't appear.
If I change it in rgb (i.e. rgb(229, 106, 84)), it works.

Is there a way to set the background-color with rgba?

Thank you in advance.
Edoardo
Zuinglio Lopes Ribeiro JúniorZuinglio Lopes Ribeiro Júnior
Hello Edoardo,

Unfortunatelly there is not. The PDF engine does not work quite well with CSS3. To achieve the desired behavior, I recommend you to use a image with transparency instead.

​Regards.

Don't forget to mark your thread as 'SOLVED' with the answer that best helps you.