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

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

    How do I move the hover text from its default position. In its current position, it is covering my input box. The previous example is no longer available.

  • Adams_Ryan

    How do I make an answer come up in red/ green once selected?

    I need the customer to know that something is dangerous or faulty in the form at a quick glance.

  • compliancerocks

    I want a list of questions each with a space to sign next to them, e.g.

    Topic one - SIGNATURE
    Topic two - SIGNATURE

    How best to use CSS to make this happen?

  • gpceeat


    I need space between the Field-Label and the field itself.
    How can I inject this?

  • jrod2036

    How can i, for example, change the options in a drop down list., such as as a time picker, where when someone clicks, it displays 24 different hours,, how would i go about taking off some of those hours?

    how can i pull up the EXISTING css code and maybe just take them off manually and repaste?

    jrod2036 at yah(you know the last two letters) dot kom

  • Meeta

    I want to modify my form such that it has 4 text boxes when I enter a number, say 4.
    For instance, when I ask how many subjects do you want to take in the first semester?
    The student answers 4, there should be 4 text boxes below it.
    Please help.
    Thank you.

  • ohnmar12.mcpl

    How do I remove create job from below the form?

  • heidianheuer

    how can I change the color and font-size of all the "placeholder fields" in my forms?

  • jeffnorthway

    What is the code to change the outline color of a check box? And since I am at it, how do I change the inside color of a check box?
    Thanks for any help!
    Love the form!


    Is there a code or way to get payment donation tiers (i.e. $5, $20) as buttons.

  • 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%)