Hello. I want to change the color of the button. I found CSS that changes the words “select files”color. I want to change the background of the button please. . — Sell My Junk Car
See it’s pink now.
Help would be greatly appreciated!
Hello. I want to change the color of the button. I found CSS that changes the words “select files”color. I want to change the background of the button please. . — Sell My Junk Car
Hello. You can add this CSS to your theme (or child theme) stylesheet or via the Appearance Customizer (Appearance → Customize → Additional CSS) to change the button color:
button.gform_button_select_files {
background-color: #000;
border: 1px solid #000;
color: #FFF;
}
button.gform_button_select_files:hover {
background-color: #AAA;
color: #000;
border: 1px solid #AAA;
}
Update the colors to whatever you like.
See also this article for additional information about placing CSS snippets: Where to Put Your Custom CSS - Gravity Forms Documentation
I will try it thanks for helping me out
@chrishajer
When I put CSS in the Additional CSS, I find that I have to add “!important” to everything, because its being overridden by the normal GF form styling.
But in your example you did not.
Am I missing something?
Specifically, I was playing with the look of a fieldset, like the Address block in a form.
.lmreg .lmaddressblock {
border-style: solid;
border-width: 1px;
background-color: antiquewhite;
}
If you have to use the !important
, that means the selectors are not specific enough, or the Gravity Forms styles are being loaded after your custom styles. You can use more specific selectors, or you can use the !important
to ensure they are always applied to these elements.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.