Skip to main content

How to put label background color in the form

Hi @wejdan,

This post may answer your question.
 

 


doesn’t work


You first need to add the CSS to the “Advanced styles” section in the Styles tab. Then add the CSS class to your Label control. Here’s how you do that:

  1. Open form and click on the top Styles tab in the designer.
  2. Expand the "Advanced styles” section at the bottom of the right-hand “Form styles” panel.
  3. Select Enabled for the “Customize your form styling using CSS” toggle.
  4. Click on the “Edit CSS” button under “Embed CSS code”.
  5. Add the CSS from the link above in the “Create custom code” popup and click the Apply Changes button.
  6. Click the “Apply styles” button in the top left-hand corner.
  7. Select the Lable in the Form designer.
  8. Go to the bottom Styling section and add the mylabel class in the “CSS class” field.
  9. Preview the form to confirm it works.

 


after applying all your instructions, still doesn’t work, should I need to write mylabel or take it from somewhere

 


Just verifying. Did you add the CSS via the “Embed CSS code” option in the “Advanced styles” section of the Form Styling tab? Instructions on doing that are in my previous post.


 


I changed my CSS to use the color in your screenshot and everything is still working as expected. I tried this in the Chrome and Edge browsers, and it works in both.

Is the control you are adding the “mylabel” class to a Label control?


Hi @wejdan,

I second that.  It works for me also.
I did notice that your code does not resolve the color as per my screenshot.

Perhaps this is  a browser issue.
 

 


Reply