Skip to main content
Nintex Community Menu Bar
Solved

How do I use CSS to change the background color of a read only field?

  • April 6, 2026
  • 5 replies
  • 19 views

Forum|alt.badge.img+2

I have a field that is part of a repeating section within my form.  The field is a Test - Short field and is set to read-only.  By default, the background color is gray. I would like to change the background color to white.

How would I accomplish this using CSS?

Best answer by cgwtamu1

I couldn’t get either Sasan’s or Simon’s suggestion to work.  However, I found this article: How to change a read only textarea's background color. and the following worked.

.whiteinput input[readonly] {
background-color: white !important;
}

 

 

5 replies

Sasan
Nintex Employee
Forum|alt.badge.img+12
  • Nintex Employee
  • April 6, 2026

@cgwtamu1 the following resources may of you help to you:

https://help.nintex.com/en-US/nwc/Content/Designer/CustomCSSGuidelines.htm


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • April 7, 2026

Hi ​@cgwtamu1,

So, adding onto what Sasan is advising.

If you gave the control the CSS class name of “readonly” your CSS would look like this:

[dir] .nx-theme-styles .nx-theme-form .readonly .nx-theme-input-1 { 
background-color: #ffffff;
}


 


Forum|alt.badge.img+2
  • Author
  • Rookie
  • Answer
  • April 7, 2026

I couldn’t get either Sasan’s or Simon’s suggestion to work.  However, I found this article: How to change a read only textarea's background color. and the following worked.

.whiteinput input[readonly] {
background-color: white !important;
}

 

 


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • April 7, 2026

Hi ​@cgwtamu1,

Great to hear that you found a solution.
I did test my code before posting, so strange it did not work for you.


Forum|alt.badge.img+2
  • Author
  • Rookie
  • April 8, 2026

I’m new to Nintex so I’m sure I did something incorrectly.