# Perspective Table: Add prop to style table background

**URL:** <https://forum.inductiveautomation.com/t/perspective-table-add-prop-to-style-table-background/56889>\
**Category:** Ignition\
**Created:** [March 7, 2022, 4:44am UTC](https://forum.inductiveautomation.com/t/perspective-table-add-prop-to-style-table-background/56889 "2022-03-07T04:44:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 7, 2022, 4:44am UTC](https://forum.inductiveautomation.com/t/perspective-table-add-prop-to-style-table-background/56889/1 "2022-03-07T04:44:20Z")

</div>

Please add a component prop on the Table component so that we can set the background instead of modifying CSS for this:

```auto
.ia_table__body {
    background-color: var(--container); <---
    font-size: 0.875rem;
}

```

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [March 7, 2022, 6:44am UTC](https://forum.inductiveautomation.com/t/perspective-table-add-prop-to-style-table-background/56889/2 "2022-03-07T06:44:19Z")

</div>

Do you mean this one?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/2/221a7230cbe3bb5aa707cc20f65fb5862f3d2768.png)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 7, 2022, 7:34am UTC](https://forum.inductiveautomation.com/t/perspective-table-add-prop-to-style-table-background/56889/3 "2022-03-07T07:34:59Z")

</div>

Try a dataset with 2 rows where the table is taller than two rows. That style is setting the background colour of the rows, not of the table background itself (i think)

---

<div class="post-metadata">

**Author:** ![jcorey](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jcorey/32/26937_2.png) [@jcorey](https://forum.inductiveautomation.com/u/jcorey)\
**Post date:** [March 7, 2022, 5:36pm UTC](https://forum.inductiveautomation.com/t/perspective-table-add-prop-to-style-table-background/56889/4 "2022-03-07T17:36:10Z")

</div>

In 8.1.11 we introduced many new table styles, I think the one you are looking for is bodyStyle?

 ![backgroundStyle](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/f/ef8a36179481b4771269a53cd46fff56243755a7.png)
