x

Separate button CSS for forms

Hi all,

Wondering if you can please help me...

I need my form submit button to look different to other buttons. I've edited CSS, but don't know how to do this in such a way as to edit a specific button within a form, as opposed to a regular button.

Can this be done? If so, how?

Any information you can provide would be greatly appreciated. Thanks.

2,294 Views
Message 1 of 7
Report
6 REPLIES 6

Hey there! To clarify, you're looking for a button that would be specific to a specific form, or just forms in general?

2,275 Views
Message 8 of 7
Report

Either, or. The trouble I'm having is they share the same class to regular buttons. Thanks!

2,271 Views
Message 8 of 7
Report

Try adding more specific CSS rules. For example, if you're using this right now:

.button-class
{
background:#EFEFEF;
}

Try something along these lines:

form.form-class .button-class
{
background:#EFEFEF;
}

I'm sure the parent containers of forms have some classes of their own, so you can keep it specific to only buttons within forms.

2,260 Views
Message 8 of 7
Report

Thanks - I'll give this a try and let you know how I go.

2,253 Views
Message 8 of 7
Report

I gave this a try, but couldn't get this to work. Here's the page (refer contact form in the lower half of the page)

http://www.faithcentre.co.nz/contact.html

Thanks again for your help.

2,252 Views
Message 8 of 7
Report

Hey I had the same problem with my site, and managed to get hold of this code which has seemed to work a treat. It just edits the button on the form and no others. 

This is how it turned out on my site.

Hope this goes well for you 

}

form .wsite-form-button {
	background: #f06b1e none repeat scroll 0 0 !important;
    border: 0 none;
    box-shadow: 0 1px 2px -1px #999 !important;
    margin: 20px 0 40px !important;
    padding: 15px 45px !important;
}
2,170 Views
Message 8 of 7
Report
This thread has been archived and locked. Please start a new thread if you would like to continue the conversation.