Assigning CSS ID and CSS Classes to a control

Yeeflow team
Yeeflow team
  • Updated

How to assign an ID or class to an Element

You may need to add a custom CSS or script to a control to customize styles or layouts. In such cases assigning an CSS ID or a CSS class to a control is crucial. You can assign both an ID or class to a control.


In order to do that:

1. In the designer of a form or dashboard, select the control which you want to assign an CSS ID or a CSS class to, so that the settings panel shows up on the left.

2. In Advanced tab, and in the Advanced section, look for CSS ID option and CSS Classes and write your ID or class name for the control.

cssid_cssclass.jpg

 

Custom style with CSS classes and custom CSS

For example, if you’ve placed a section in the designer, we’ll give it a custom class, which we’ll name “so-yellow”. (Go to Advanced > CSS Classes and make sure you don’t include the preceding dot here).

cssclass_name.jpg

Now, in the Custom CSS tab, simply reference the custom class “.so-yellow”, and yes, you will need to include the preceding dot here.

customcode_sample.jpg

As expected, the section’s wrapper now shows our bright yellow color for its background.

section_yellow.jpg

 

Was this article helpful?

/

Comments

0 comments

Please sign in to leave a comment.