1

I have several Content fields in my Cognito form which is embedded in a web page on my site.

I want to use CSS styling to change the font colour on one of them to red but can't see a way to reference a specific content field

2 Answers 2

0

I'm a developer with Cognito Forms.

The Content field can only be targeted as a whole, so inside the Content field you will have to set the text that you want to adjust to a heading in order to give it a tag that you can target.

So if you are not using the 'Heading 6' for anything else in the Content field you can select this to give the highlighted text the tag.

enter image description here

You can then use the h6 tag in conjunction with the tag for the Content field to target just the line of text with the h6 tag. In this example you will use the following CSS to target the h6 tag in the Content field. You will also want to keep in mind that in addition to changing the font color, you will also want to adjust the font weight and size, as this will also be changed by the default h6 styles.

.cognito .c-forms-form .c-html h6 {}
-2

Custom css could also help you. See Example https://codepen.io/hardo91/full/OrMMBZ

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.