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 {background:#baffb9;}

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;}


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
  • ugesavet

    Hi. To integrate the form with google calendar, for the start time field I must choose datetime. To define the final time, I need a datetime field that in my form only shows time and does not date.
    How to hide date and show time?

  • seekerhealth

    I would like to have two parts to a question. I want the second part to be of a smaller font, and indented a bit to the right (basically providing additional notes to the question above)

    How do we do that?

  • hillsceneLIVE

    I would like to alter my previous question "How do I make the sub labels under the questions a different colour? The code supplied only changes the colour of the sub labels under the personal information data." as I have worked out that the sub labels turn grey when I have character limits. Is there a way to keep the sub labels in my colour choice AND have character limits for answers for long text entry?

  • hillsceneLIVE

    How do I make the sub labels under the questions a different colour? The code supplied only changes the colour of the sub labels under the personal information data.

  • AZDBAdesze

    Is there a way to remove the borders around a frame url that is a spreadsheet on a Iframe Embed widget?
    I have a spreadsheet that I want to show the user on the form I have created and I only want to show the columns and rows.

  • patriciabriggs

    I am trying to remove the border round my form?

  • Matt

    I have a basic questionnaire form. It looks great on desktop but not on the mobile preview. My logo is cropped at the top and the facebook widget is cropping on mobile.

    How can I get these to "fit" on the screen when someone is viewing on their mobile device?

  • nicolassoong

    Hi, for single choice answer, how do I make the answer "circle" larger?

    Thank you.

  • SadieBelles_Sweets

    How to make a field a required field?? I want to add the asterik and people cant submit the form without filling that field out

  • rtolmach

    It would make things so much easier if the text color selector on the Text Quick Element let us choose a hex color.
    Until then, how can I change that color with CSS? I do not see it explained on this page,

  • sonoranserenityspa

    how do i make the BMI widget bigger vertically? i got some code for just the BMI that i added and it worked, but now i'm trying to incorporate it into a bigger form and when the BMI calculates, it gets cut off because the height is too small. form is

  • janiew77

    Can you tell me how to add codes to increase height of text fields? Not sure why they are looking so small. Thank you

  • nicolemarlin

    Is there a way to make one multiple choice option associated with an element, such as having the option to choose a number appear in a multiple choice option? I want to use this to affect pricing, where it would be the set price times the number that is entered.

  • aelfassy

    I was wondering if there was a way to take the limit off the date reservation tracker. I would like more than one person to be able to choose a date but once it is chosen the date doesn't show up again.

  • helenmarshall

    How do you CSS line height? Thanks

  • dawnielle

    I need help please with CSS code to make the multiple choice quetions and answers appear in arial font - 12 pt. Can you help?

    My email address is Dawnielle is no longer with us.

  • stevefitzgerald18

    How do I remove the shadow around the form? I'd like it to be flat.

  • mhowe479

    I have a form with an input table, with 6 columns numeric. Is there a way to limit it to only 1 numeric number per field?

  • larrywf

    Is there a CSS code that will take a numerical entry in a "Number" field or a field that has a numerical value that comes from a conditional calculation and add the dollar sign and a two place decimal? So an entry or calculation of 234 will appear as $234.00 or 234.3 as $234.30. Thanks.

  • portministries

    How can I make the multiple choice widget to insert numbers instead of a check mark? I'm trying to have it list number preference rather than selecting multiple options.

  • rodrigobritto

    Olá, Tudo bom ?

    Como faço para colocar as fotos do formulário no tamanho de 3x4 ?

    A ferramenta que utilizo deixa as fotos no tamanho que são enviadas, mas queria que no PDF gerado pelo Jotform a foto ficasse em 3x4 para que na mesma folha de PDF houvesse várias inscrições.

    Fico no aguardo.

    Desde ja agradeço a atenção

  • Jessmiles

    I have a form that contains Input Tables.
    Is it possible to use CSS to format these so that the data entered becomes 'wrapped' in the cells?
    i.e. rather than text being cut off because of the limitations on width, the information would flow into another line below & the cell would effectively by double-height.

  • RobertsLaw

    Is there a way using CSS in tables to specify the width of the text fields response?

  • Freesiachew

    How do I hide a column under Matrix Dynamique when form is submitted? I do not want to hide the whole field of this feature.

  • annefarleydatainteractive

    Hi - how do I change the question size on the radio button fields.
    I don't want the question to wrap around
    Example in Facilities Access Request Approval Form

  • VictorHugozr

    Necesito un código CSS para definir que un campo tenga un número máximo de caracteres

  • kellimcguinness

    When I changed the place holder text color, all but 2 boxes changed do i get the other 2 place holder texts the same color as all of the other ones?

  • SgtNSpy

    How do I make all the radio button tables the same size for the whole form?

  • Filippsidor

    hi do i add google geolocation, i got the css code from google but doesnt work when i fill out address it doesnt show the rest of correct address

  • javadudd

    Not sure if CSS codes are what I should be using.
    I'm looking to create a set number entry ie 1234#### where the # can be any number.
    It shouldn't prompt for the 1234 but if it doesn't fit that format it should reject the entry or clear what has been entered.

  • irmercado

    Como puedo filtrar respuestas de una lista desplegable a resultados especificos.
    Ejemplo: Elegir una provincia y que despliegue sus municipios

    Ej: Provincia Hermanas Mirabal =(Tenare, Salcedo, Villa Tapia)
    Duarte = ( San Fco, Castillo, Pimentel, Las Guaranas)

  • vnielson

    I am looking to change the layout of address field to be from
    #input_7_addr_line1, #input_7_addr_line2, #input_7_city, #input_7_state, #input_7_postal, #input_7_country
    #input_7_addr_line1, #input_7_addr_line2, #input_7_city, #input_7_county, #input_7_state, #input_7_postal
    How would I make that change ?

  • Tara McWhite

    Hi, I can't see the custom CSS option in Form Designer. What am I doing wrong?

  • VCH_victoria

    Dear Jotform,
    I added the widget: Matrix Dinamique. I want to change the font of the letters and the size. Is there a code for this? I also want to change the size of the separation line in this widget. because it is bigger than all the other lines.

  • dlsnelson

    I am using a theme and I need to know how to increase the vertical space between a label and the input lines. I am new to all this! Would I enter the CSS code in the Form Designer....and what would that code look like? Also, I have 4 input tables with only one column for input. How can I make that column wider for the person inputing information. The input box allows for quite a bit of information, but I would like to see a larger box. I'm sorry I do not have screen shots. I'm new to my laptop and haven't quite figured out screen capture. Again, what would that code look like?

  • 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?