JotForm User Guide / Advanced Features /

Customize Your Form Using Custom CSS Codes

Customize Your Form Using Custom CSS Codes

UPDATE: Let's create fantastic forms with Form Designer video course which allows you to generate beautiful form designs without knowledge of CSS!

First, you need to learn how to inject custom CSS on your form before you can start customizing your form using the CSS codes provided below.

Set a Background Image to the Page

.supernova {
background-repeat: no-repeat;
background-position: center top;
background-attachment: fixed;
background-size: cover;}

Replace the URL with your background image.

Demo here

Make Page Background Transparent

.supernova {

Remove the Spacing Around the Form

.jotform-form {

Make Form Background Transparent

.form-all {

Change the Header Background Color

Change the Subheader Text Color
.form-subHeader {
color:#2408FC !important;

 Change all the Sub Label Color
.form-sub-label {color:#FFCC66;}

 Change the Yellow Highlight Effect Color
.form-line-active {

 Change the Form Required Star Color
.form-required {
color: blue !important;

 Remove the Red Background on Error Messages
.form-line-error {background:transparent;}

 Align Form to the Left
.form-all {margin:0;}
Preview Here

Instantly Create Two Column Layout on Shrunken Fields
.form-line-column {
width: 50%;
.form-line-column:nth-child(even) {
clear: left;

Demo here

Make credit card fields in all payment integration mobile responsive

Copy the CSS codes here:

Demo here

If you can't find the CSS code you need for your form or if you need help with customizing your form, feel free to leave comments below.

Send Comment


See all comments
  • Joelemoine1

    I need a form that will get contact information for the clients and a description of the work to be preformed along with the amount to be paid and the method of payment with a space for contract dates and sisignatures

  • efraimd

    I would like to pre-fill the coupon code box with words, so that when the page loads it already has the code in the field. Is there a way to do this with css?


    Hello :)
    I need precision about the widget : Configurable List.
    I have too much requiered fields by row. Is it possible to show them on 2 lines because they appear out of the form...
    Thank you for you response !

  • alton

    Can I and how do I set up for a form that is multiple pages to auto fill a field such as full name on the top of every page once someone types it in the first page?


    How do I populate a field with a predetermined number? (for example 100%)

  • jackiekramer

    I agree to terms & conditions. *

    Can you please help me change the colors on this line? "I agree to" WHITE "terms & conditions." RED or another bright color (this is a hyperlink).

    Thank you!

    This is on my Floral Shoot & Edit Spree - La Conner

  • DQs

    How do I change the width of a date box to look smaller on the user end

  • mattg85

    How do I get rid of blank pages that occur when a condition is not met?

  • houacct

    Hi Team,
    I need help with popup in Text field which allows me to select values from list.
    below form I am trying to use popup in selection field and use in it.

  • BLueList

    How do I chance the input table to allow for a client to enter in a percentage vs just checking the box?

  • canabird


  • earthly

    I have chosen one of your themes for my form. My form is quite long. When I apply the theme on your website it looks great because the questions on my form scroll over the theme picture but when I go to my website the picture is totally distorted and stretched out as long as my form is so it looks terrible. Can you please tell me how to get the theme to look like it does in my website as it does on the JotForm website.

  • jguth

    Hey there,

    Looking to add the "Make Page Background Transparent" and "Make Form Background Transparent" tags but it doesn't seem to actually adjust the Lightbox embed.

    Is there something else we need to do or that we are missing?


    Hi we are trying to create a table that has some columns using one type of input whilst some another (e.g. column 1 drop down, column 2 text, etc.). How is this possible?

  • MSMUwebmaster

    I'm trying to mimic a design from another site so I need a grey transparent border around my white form (with a photo back ground). I'm trying to make that boarder have a transparency of about 20% - I'm not sure how to do that with CSS on this form. Also, my border has a white hairline around it and I'm not certain why or how to remove it.

    Can you help?

  • Sharlene916

    Hello, I need to to have css code to calculate the form submissions order form for payment

  • neenah71

    This form,, is giving me trouble. When in a field, that field highlights yellow making the text unreadable. I used the code below, but it didn't change anything. Is there a different code?
    .form-line-active {

  • Glovian

    Hello there,

    I'm a newbie of JotForm and CSS, just wonder if anyone can share tricks on how we can make use of CSS to swap the position of Print Form and Submit button so Print Form shows on the left of the Submit button? I'm open to ways of doing it so please kindly share how it can be done even if CSS is not the key to the solution.

    Thank you very much in advance.


  • rotarywstg

    Thanks for this article. I'd like to make the change the label in the terms and conditions widget but with no success.

    Tried variations of

    .label {
    font-weight : bolder;
    color: rgb(71, 71, 71);
    font-family: PT Sans Narrow, sans-serif;

    but no luck.

  • floorcosts

    So with your CSS Form Designer, We can edit features of the widget, but can we add new ones?

    For example: I want to change where the input is positioned on the sliding pricing scale. I want to put the number at the top instead of at the bottom...

  • staceyvaughan

    On my theme there are border lines separting the fields and I'm trying to make them black instead of white (you can't even see them on my form) Any help would be much appreciated!

  • Gregor

    Wie kann ich den Text vom "Submit" Button ändern?

  • CapitalElectric

    Using the configurable list widget, how do I make part of the list jump down to a new line instead of being too long for the screen?

  • GinaW41hl

    Hi, can you tell me how to change the size of the font for the saved user input in the Matrix Dynamique widget? At the moment answers displayed after they Save and Add Row are very small. I want about 14 or 16pt and #ffffff . Thanks for your help.

  • ajp95

    I am trying to change the colour of the asterisk on my form as at present it is red on a red background. I have followed the instructions and managed to change it to white but it does not save the changes.

    Are you able to help?

  • oliverpowell

    Does anyone know how to change the list hover states of .form-autocomplete-list.

    I've managed to style a few things, but I'm finding it impossible to inspect a dropdown to figure out what style sheet it belongs to.

    It would be awesome if JotForm surfaced up all the hidden elements.

  • remman

    I have a Long Text Entry Element in my form. I want to change the background colour of THE TEXT ONLY to yellow. Please help!!

  • chefjeff

    Anyone have a suggestion to target product images and force them to stay open or at a specified height in the current collapse functionality? Thanks!

  • shadowcliff

    Is there CSS I can use to alter the matrix found under Survey tools? I am trying to increase the size of the text box. Thanks!

  • fittech

    Any help regarding safari css? y for is working good on chrome but when I open it in safari the field alignments got disturbed.

    How I add css for safari browser? Please tell with syntax.

  • klebe bh

    Very nice post you're sharing with us.

  • FinancialChange

    I have created a sidebar using a text box with contact info like office hours but I want to make the remainder of my contact form beside it rather than below it. How can I change this?

  • Cubibot

    Hello, can I put submit button at the right side of text box ? but same level , not lower !

  • scaoffice

    You guys are brilliant! Thanks for the excellent cheat sheet.

  • ORMTANewmarket

    Is it possible to edit the header rows or columns in the spreadsheet widget? For example, rather than "A, B, C" along the top to rename them as "Name, Age, etc."

  • jwfieren

    What is the css to change color input fields? I would like the color to be white and text to be black.
    Thank you

  • thedesignlab


    I need help trying to customise a sliders with calculated result. Im trying to change the layout like the slider_handle but cant for some reason.

  • testtrust


    How do I change the color of tittle-texts and the phrase "Enter your address here" on the field?

    I also need to add a small sample below the shape.


  • Heather Scharding

    How do I remove all of this grey color in these boxes. I have tried but it seems to want to default to a theme. I don't want that. I want everything to be white and then my lettering to be black. Here is the URL for one of the forms i put on my website:
    here is the link to the form:

  • a2000

    Hi I need some help with the padding and margins. After i used the designer function and added the source code into my html page as well as upload the CSS files, there's now a huge padding above my form and a margin on the left where i'd like it to be aligned with my header.
    Please help!

  • Pete

    I am trying to change the colour of individual dropdown list options based on condition. What I mean is if a problem occurs in location 3 the word "location 3" in my location dropdown list turns red to tell me where the issue is, other locations remain black text.

  • Jay

    I need any way to differentiate a field from the populated data info and the info entered by the user.
    So that once a user has visited and changed any info that filed looks different from the other fields. Don't care if its background highlight, or Box Border color, etc... THANKS!!

  • cccsdev

    How to make a text box recognize currency? For example, if someone enters 50000...I need the output/result to be $50,000 or 50,000.

  • AdminRSCM

    How to make textbox areas transparent with a line not a boxed border?

  • Paul Zucker


    I am using the premade template payment form.

    I would like to make a couple of changes within the form itself, but when I go to the form designer, it appears locked; I can only add fields above the form or below it (except for product fields which automatically go to the top within the form).

    At the least, I would like to add text within the form (as a heading to a group of products).

    At the most, I would like to add text fields - in order so that they may provide a shipping address, if different - within the form.

    Is there a way to do either or both of these?

    Again, I do not wish to add fields above and below the premade form - as I know this can be done - but within it.

    Thank you,

    Paul Zucker

  • tlws

    I would like to place the actual form (with the headings, fields, etc) at the top of the page (so there is no background or margin above it) but have not been able to figure out how to do it with the custom css.

    In other words, I would like to add my own spacing above the form after I embed it.

  • zubeida

    I want to change the colour of the radio button (from blue) in the matrix.

  • camid01

    I would like to add multiple lines to the header.


    Hi I would like to remove the postal code field from the address box. How can I do that?

  • rlzolinas

    What is the css code for changing the unique question text? Thanks in advance! The theme and text do not match the rest of my forms.

Browse Article by Topics