Table background color

Hello, I am trying to apply a light grey background color to a table with multiple columns, and rows that use loops to pull from a data upload reconciliation to populate the table. I have attached a picture of what the code currently looks like. The commented out line is the color I am trying to apply. The table is currently working and when I apply the color, the table spacing gets ruined. To apply the color I add it to the code as follows:

{% stripnewlines %}
|--------+D3D3D3
{% newline %}
|----83%----
|:—02%—:
|----15%—:+

Please let me know where I am going wrong when trying to apply the table background color to this code.

Hi @ZachF37

It looks like you have two table definitions, so the second overwrites the first.
You’ll need to combine both into one definition, like this:

{% stripnewlines %}
| Header 1
| Header 2
| Header 3
{% newline %}
|---83%-----
|----2%----
|----15%----+D3D3D3
{% newline %}
| content
| content
| content
{% newline %}
| content
| content
| content
{% endstripnewlines %}

For a smarter approach you would have to convert your table to HTML and apply a class to assign a background color to certain cells.
(see more: HTML tables )

Kind regards,
Romy