User Guide

 

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-image:url('http://www.site.com/image.jpg');
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 {
background:transparent;
}


Remove the Spacing Around the Form

.jotform-form {
padding:0;
}


Make Form Background Transparent

.form-all {
background:transparent;
}


Change the Header Background Color
[data-type="control_head"]{
background-color:#FFCC66;
}


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: http://pastebin.com/raw/UJV3nGf5

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

63 Comments...

See all comments
  • 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?

  • ISAUEL

    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.
    https://form.jotform.com/72786676907173

    Can you help?
    KH

  • Sharlene916

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

  • neenah71

    Hello,
    This form, https://form.jotform.com/10184333025, 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 {
    background:#738c89;
    }

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

    Regards,
    Glovian

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

    https://form.jotform.us/71473464725158

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

    https://form.jotform.us/71436961099163

  • 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?
    https://eu.jotform.com/build/70184336743356

  • 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

    Hi,
    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

    Hi,

    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

    Hi,

    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.

    https://widgets.jotform.com/widget/autocompleted_address

    Thanks.

  • 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:
    http://leapgraphics.com/customer-worksheets-flyers/
    here is the link to the form:
    https://form.jotform.com/60457280972158
    thanks

  • 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!
    http://www.uniq365cloud.com/Jill/contact.html

  • Pete

    Hey
    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

    Hi,

    I am using the authorize.net 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.

  • CLLUWI

    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.

  • Russ

    How do I change the label sizes?

    I am referring to the text box next to a radio button for example

  • IEHA

    I am simply wanting to move my text boxes closer together vertically to mimic the address quick tool. Does this have to do with the "padding" I am seeing in the design tool? If so, can I adjust the padding of specific text boxes?

    As a follow-up, is there a way to apply a CSS to a selected group of fields as opposed to individually or the form as a whole?

    Regards,
    -Tim

  • jmuskus

    Me again! I changed the background of my header but the color does not reach right across the width of the form meaning the background color of the form also makes up part of the header... Can you help?

  • jmuskus

    Hi,

    I entered the code above to remove the red background of the error message but it doesn't seem to have worked, this is the current code entered in the custom css box:

    .font--face {
    font-family: 'Carrois Gothic';
    font-size: 16px;
    font-style: normal;
    font-weight: 400;src: local('Carrois Gothic'),
    local('CarroisGothic-Regular'),
    url(http://fonts.gstatic.com/s/carroisgothic/v4/GCgb7bssGpwp7V5ynxmWy2IHn70NeZKJ0uStDo7Dza8.woff) format('woff');
    }.form-all {
    font-family: 'Carrois Gothic';
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    }
    .form-required {
    color: black !important;
    }
    .form-line-error {
    background:none repeat scroll 0 0;
    }

    Thanks in advance!

  • Jiveghost

    Hey there.
    I have a column of many different 'Check Box' questions, each with 3 boxes to check.
    When a question has an option 'checked' it naturally lights the question up yellow.

    What I would like to do is keep the question lit up for as long as an option is checked. So if ten questions have boxes that are checked, all ten questions would still be lit yellow. And when/if the boxes are unchecked the question would lose its lighting.

    Any help would be greatly appreciated.

  • datahelpline

    here is my form linl
    http://www.jotform.ca/datahelpline/payment
    i am wondering if it is possible to change Security Code input type from text to password???

  • whizz_kid

    how do I change the fonts in the form to the ones in my website? My website is using this font pulled into the CSS: @import url("http://fonts.googleapis.com/css?family=Oswald:400,700&subset=latin,latin-ext");

    How do I get the same font on my jotform?

  • averis

    I have developed a conference registration form and have it set to integrate with paypal for credit card payment only. I would like to have the redirect to paypal page open as a new tab on the browser so the registrant doesn't leave my website. How do I do this?

    Also, I have the form set that a thank you appears when they register to pay by check, but how do they get a thank you after submitting the form if they go to paypal? Thanks so much.

  • georgeb

    How can I use the same color as the background image?

    I imputed the css coding as shown above and it isnt doing anything.

  • showmansh

    how can I add a company logo to the top of the page, small gif image about 100 x 100 pics

  • Manthan

    Any attractive one available for our store Oshopindia?

    Thanks
    Manthan

  • zeraph

    For everyone with questions about specific changes they want to make in the CSS:

    Use a Webmaster extension for Firefox or Chrome (Firebug, Webmaster Tools, etc)- Once this is installed, view your form ON your site and right click the element you wish to change, select "Inspect Element." This will show you what CSS is being used to style the element. That is what you want to override when you inject custom CSS. You can even play with the numbers to see what you like before you make changes.