Customizing Your Form Using CSS Codes

January 23, 2026

Aside from the built-in form designer, you can also customize your forms using CSS in Form Builder. This guide contains a few examples of CSS codes that you can try or use on your forms.

Add a Background Image to the Page

The following CSS code allows you to add a custom background image for your form.

A contact form with a lake cabin background
.supernova {
	background-image: url('{image_url}');
	background-repeat: no-repeat;
	background-position: center top;
	background-attachment: fixed;
	background-size: cover;
}
body {
	background: none;
}

Replace {image_url} with your background image’s URL.

Note

Use a secure HTTPS address for the image URL to avoid mixed content blocking.

Make the Page Background Transparent

Useful on embedded forms, you can use the following code if you need your form to use your web page’s background.

A white contact form with gray and white checkered background
.supernova, body {
	background: none;
}

Make Form Background Transparent

The following code removes your form’s background and shadow making it flat and transparent.

A contact form with gray and white checkered background
.form-all {
	background: none !important;
	box-shadow: none;
}

Remove the Spacing Above the Form

Useful on embedded forms, the following code removes the extra space above your form.

A side-by-side comparison of an embedded contact form before and after removing the space at the top
body, .form-all {
	margin-top: 0;
}

Change the Heading Background Color

Use the following code to change the background color of all the Heading elements on your form.

A contact form with an arrow pointing to its "Contact Us" heading section with a bluish background
.form-header-group, [data-type="control_head"] {
	background-color: #c9daf8;
}

Protip

For color-related properties, you can use an online color picker to generate your color’s hex value (i.e., #a1b2c3).

Change the Subheading Color

The following code changes the text color of all your Heading elements’ subheaders.

A contact form with an arrow pointing to its green "We're available 24/7" subheading
.form-subHeader {
	color: #00b000 !important;
}

Change All the Sub Label Color

Use the following CSS code to change the color of all the sub-labels on your form.

A contact form with an arrow pointing to the orange "First Name" sub-label
.form-sub-label {
	color: #ffb21d;
}

Change the Highlight Effect Color

You can use the following code to change the background highlight on input fields.

A contact form with an arrow pointhing to the active Name field set with greenish background
.form-line-active {
	background: #ccffcc;
}

Change the Form Required Star Color

Red by default, the code below changes the fields’ “required” indicator.

A contact form with an arrow pointing to a cyan asterisk next to the Name field label
.form-required {
	color: cyan !important;
}

Align the Form to the Left

Useful on embedded forms, you can use the following code to move your form to the left.

A contact form hugging the left side of the screen
.form-all {
	margin: 0;
}

Send Comment:

Jotform Avatar
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Podo Comment Be the first to comment.
Still have unanswered questions?

We’re here for you 24/7, anytime you need us day or night. Have a question or need a hand with something? Our team is always ready to help out.