# Style classes not applying to disabled numeric entry fields

**URL:** <https://forum.inductiveautomation.com/t/style-classes-not-applying-to-disabled-numeric-entry-fields/78047>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [August 18, 2023, 4:17am UTC](https://forum.inductiveautomation.com/t/style-classes-not-applying-to-disabled-numeric-entry-fields/78047 "2023-08-18T04:17:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amy.sudibyo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amy.sudibyo/32/38659_2.png) [@amy.sudibyo](https://forum.inductiveautomation.com/u/amy.sudibyo)\
**Post date:** [August 18, 2023, 4:17am UTC](https://forum.inductiveautomation.com/t/style-classes-not-applying-to-disabled-numeric-entry-fields/78047/1 "2023-08-18T04:17:09Z")

</div>

Version 8.1.25.

I am having issues with numeric entry fields not applying style classes when they are not enabled. In this example my style class is applying a background colour, which works when the entry field is enabled but not when it is disabled. Interestingly, if I apply a background colour directly on the disabled entry field rather than using a style class, it seems to work. I don't have this issue with other perspective components (e.g. text field), presumably this is not the intended behaviour?

![Screenshot 2023-08-18 140253](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/f/1f2bf94ef613d0e48f700e72432d47cb5d2bfb16.png)  
 ![Screenshot 2023-08-18 140308](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/3/131bef87d4c5faace481fc8f4ad230d63273ce29.png)  
 ![Screenshot 2023-08-18 140325](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/e/1e3f02e87a4cecf12f218272dd680f0621980862.png)  
 ![Screenshot 2023-08-18 140418](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/a/ca86cf271e3657cc4ca72fd867983f463f25de6e.png)

---

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [August 18, 2023, 4:19am UTC](https://forum.inductiveautomation.com/t/style-classes-not-applying-to-disabled-numeric-entry-fields/78047/2 "2023-08-18T04:19:56Z")

</div>

Hello,

Have you tried adding an element state disabled in your style class and set the background color you want for disabled state in the style class?

Frank

---

<div class="post-metadata">

**Author:** ![amy.sudibyo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amy.sudibyo/32/38659_2.png) [@amy.sudibyo](https://forum.inductiveautomation.com/u/amy.sudibyo)\
**Post date:** [August 18, 2023, 4:37am UTC](https://forum.inductiveautomation.com/t/style-classes-not-applying-to-disabled-numeric-entry-fields/78047/3 "2023-08-18T04:37:07Z")

</div>

Thank you, that seemed to work. Interesting that this only was required for numeric entry and not text field, button etc.
