Recently one of clients upgraded from 19 R1 to 20 R1.
In 19 R1 instance, labels are displaying in Red color with this property ForeColor = “Red” but in 20 R1 instance still it showing in black color and we tried by adding CSS still showing in Black color. Please find the screenshots for reference.
Could you please suggest me that if can change the colors for text in 20 R1.
Best Regards, Navee B
Best answer by Hughes Beausejour
Use a browser debugger Inspect Element feature to look up the HTML control names and CSS class of the target controls.
For example here I looked up HTML control ‘label’ :
Then modify theme file located in ‘\YourWebsite\\App_Themes\Default\00_Controls.css’ to change the CSS style.
Here I changed HTML label controls color to red by adding this style:
label { color: rgba(255, 0, 0, 1); }
The About box dialog uses a span HTML control instead of a label.
The control has a CSS class labelH we can target but it also has inline style which will override the CSS style:
To have CSS class applied instead of the inline style color you need to add CSS important keyword:
.labelH { color: rgba(255, 0, 0, 1) !important; }
Style properties marked important will be applied even if another style is trying to override it:
ForeColor property works at ASP level but the CSS is applied after that so you need to change CSS.
Examples above target all controls. When you want to target a specific Acumatica editor control you can use custom CSS class. This example is for field SOOrder.Status.
Then lookup the control type with browser debugger, this is an input type control:
To target that element you have to specify your custom style and the name of the control:
To have CSS class applied instead of the inline style color you need to add CSS important keyword:
.labelH { color: rgba(255, 0, 0, 1) !important; }
Style properties marked important will be applied even if another style is trying to override it:
ForeColor property works at ASP level but the CSS is applied after that so you need to change CSS.
Examples above target all controls. When you want to target a specific Acumatica editor control you can use custom CSS class. This example is for field SOOrder.Status.
Then lookup the control type with browser debugger, this is an input type control:
To target that element you have to specify your custom style and the name of the control:
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.