Reputation: 1
I have a very simple php contact form that works. I am trying to make the form look nice and everything has been smooth until I get to styling the submit button.
The button code is:
<input type="submit" value="Submit">
I would like to use css to style the button.
The code I would like to use is:
<input type="submit" id="comment-submit" value="Submit">
The CSS for id="comment-submit" is:
#comment-submit {
width: 144px;
height: 44px;
display: block;
border: 0;
font-family: "YanoneBold", Arial, sans-serif;
font-size: 18px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #fff;
text-shadow: 0px 1px 0px rgba(0,0,0,0.35);
padding: 0 4px 4px 0;
margin: 30px 0 80px 0;
}
With no styling the form submits properly. With styling the form does nothing.
Upvotes: 0
Views: 781
Reputation: 2900
Instead of declaring it as an ID
, declare it as a CLASS
so
.comment_submit {
width: 144px;
height: 44px;
display: block;
border: 0;
font-family: "YanoneBold", Arial, sans-serif;
font-size: 18px;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #fff;
text-shadow: 0px 1px 0px rgba(0,0,0,0.35);
padding: 0 4px 4px 0;
margin: 30px 0 80px 0;
}
<input type="submit" class="comment_submit" value="Submit">
Try this, I guess may be that id is causing problems, and make dash to underscore, and just for the purpose, use a simple font instead of using a web font, and remove text-shadow property too.
Upvotes: 1
Reputation: 57
If you change it to a <button type="submit"
it might work or change the css to input[type=submit]{}
but that might have issues in IE
Upvotes: 1
Reputation: 1792
Sorry. I should add it in comment but I dont have priviledge.
I copy/paste your example and it works. I have:
<form action="" method="get">
<input type="hidden" name="ble" value="uff" />
<input type="submit" id="comment-submit" value="Submit">
</form>
and in Chrome and Firefox it sends GET data. Maybe problem is somewhere else. One thing what is different is that your mouse cursor doesn't change.
Upvotes: 0