I was recently asked how the Submit button could be styled when using a Google Form in conjunction with my WordPress Google Form plugin. Fortunately this was an easy question to answer because I had done something similar for another site. Now I suspect the person asking me didn’t want to make their submit button pink but the CSS selector should be the same – it is just a matter of adding the CSS directives to achieve the desired affect! I used the following selector to style the Submit button:
div.ss-form-entry>input[type="submit"] { background-color: pink; }
This little trick should help further integrate Google Forms with your WordPress site.
Update: Recently I was asked how to style only the Submit button – all other buttons (e.g. Back, Continue, etc.) and input fields should keep their default styles. Here is some CSS which will style only the Submit button:
div.ss-form-entry>input[type="submit"][name="submit"] { background-color: pink; }
This is all great stuff and I really appreciate the articles but doing this changes all text boxes as well as the submit button. I’ll come back when I’ve figured out how to do the submit button.
By the way, does this plugin or chaining the style of these forms violate any of Googles TOC’s?
Cheers
Ramy
To the best of my knowledge it does not violate the Google ToS. Hiding the Google links might but by default they are left visible.
.ss-navigate{}
That’s what did the job in the end for me 🙂
That worked for me too. I was using ThemeForest’s Avada theme with custom css for all the forms, not just a specific one.
Excellent – glad to hear that you were able to find a solution from the other questions I have answered.
Hi Mike,
I tried your CSS above but it changed the background of all the Google input fields pink as well.
Cheers,
John.
Try this to limit the styling to just the submit button:
Yes that works fine. thanks. so how do we change the colour using hex values etc?
Looks like I never answered this – I apologize.
To use a hex value simply swap “pink” with a hex value (e.g. “#a0a0a0”) in the example above.
My “Submit” button somes up in Chinese… I’m in WA state. In other places I can add “&hl=en”, but the magic of your script (thank btw) hides that from me. Any hints?
Someone else mentioned this same problem about a week ago and their problem went away after a couple hours. It may have been a glitch on the Google side because adding the language parameter as you tried, should work. That is exactly how I set up the Sample Form in French on my site. All I can suggest is to double check your syntax and make sure that if you use the WordPres WYSIWYG editor that it didn’t turn your ampersands into their HTML equivalents.
thanks, I copied your French version with en and it took care of things. I appreciate the follow up
Where do I paste this code? Do you have any tips for eliminating the “squaring” effect when the form is displayed in Chrome?
To use Custom CSS you have two options (as long as you’re using a fairly recent version of the plugin):
As for your question about the “squaring” effect, I am not sure what you mean by that. I use Chrome as my default browser and I don’t see any material difference between forms when running under Chrome versus Firefox (which I like better for debugging). Do you have a screen shot you can point me to?
It would be really helpful to have a list of the names of the CSS hooks made available in this plug and an explanation of what items they refer to so that one can easily work out how to apply styling.
I spent a long while trying to force size changes on the width of various fields, the text boxes seemed to default to 127px – which looks odd unless you have 4 columns. Eventually worked out how to force a % value.
Great plugin otherwise. Thanks
That is a reasonable request, I’ll see what I can do to add that. I do list all of the CSS classes that I know of as part of the plugin. You can see it in the Other Notes section in the plugin repository. I can add more comments to the CSS file as I have time.
If your text boxes defaulted to 127px that may be a function of your theme as without any CSS they will pick up whatever your theme defines. Every theme is different and having looked at probably a 100+ CSS questions there isn’t a simple answer that applies to all themes. Some themes are very heavy on CSS as the only way to tweak CSS rules for WordPress Google Form is to use the !important CSS operator. It isn’t very elegant but occasionally it is the best solution.
Hi Michael,
I’m new in using google form plug-in and my css skills is just a beginner.
This is my form below and i want to retain the grid in my website which is completely gone. Also i want all of the text on the left side to have the same width & bigger font size to make it presentable.
I tried copy and pasting the css code from the google form to the Form CCS field in your plugin but I see no changes in the form.
Here is the css :
[ … snipped …]
Removed CSS and link to form
The easiest way for me to help you is for you to complete my Help and Support form. It will request the necessary information I need to look into your problem. I have removed all of the CSS and links to your form from the comments as as safety measure.
Hi,
Just completed the Help and Support form. Thanks!
Hello Michael,
I really enjoy this plug-in! It has helped me a ton. The forms were working great, then today when I was on my site I noticed that the “Submit” button is not looking correct. I had changed the input text from “submit” to “send” a while back had put the custom CSS code from above in to change the color and now the button is not responding the the code. I changed it back to “submit,” but it is still not responding. You can view one of my forms here:
http://lifefortheinnocent.org/apparel-order-form/
This is the code that I have in the Google Form Global Settings:
div.ss-form-entry>input[type=”submit”] {
background-color: #ffb600;
}
I updated to wordpress 4.0.
Any ideas? Thanks!
When I look at your form, I see the “submit” button is now “Send” and is a different color. Did you sort this out or is there still a problem?
Hello Michael,
Thank you for this useful plug-in! Just wondering, the “submit” button is currently aligned to the left. Is it possible for me to change the position of the button to the center?
Thank you!
With CSS you can do lots of things, it is usually a matter of trial and error. That said, center aligning things tends to be tricky if you want it exact. If you are good with the it being “roughly” centered, you can add a margin-left or padding-left (you’d have to experiment with it) to the DIV which contains the submit button.
What if the submit button isn’t showing on the published page entirely?
If you don’t see the submit button at all, it likely means you are using the newer, and unsupported, version of Google Forms. You’ll need to downgrade your form for the plugin to work correctly. There are several posts on my site about downgrading a form. Like this one. Or this one.