# Data binding to change div background color not working

**URL:** <https://forum.ionicframework.com/t/data-binding-to-change-div-background-color-not-working/109502>\
**Category:** ionic-v3\
**Created:** [October 20, 2017, 6:06pm UTC](https://forum.ionicframework.com/t/data-binding-to-change-div-background-color-not-working/109502 "2017-10-20T18:06:48Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![edriven](https://avatars.discourse-cdn.com/v4/letter/e/74df32/32.png) [@edriven](https://forum.ionicframework.com/u/edriven)\
**Post date:** [October 21, 2017, 5:46am UTC](https://forum.ionicframework.com/t/data-binding-to-change-div-background-color-not-working/109502/6 "2017-10-21T05:46:16Z")

</div>

If you can find my post earlier… You’ll see that this will not work in Safari. You will need to set the class and not the style. Style is read only you’ll need to use [(ngClass)]=“bar1color” or something along those lines.

---

_[View the full topic](https://forum.ionicframework.com/t/data-binding-to-change-div-background-color-not-working/109502)._
