I don't like the default button style. It's really boring. I am using
<input type="submit">
type buttons. Can I style these somehow in css? If not, the other way of doing it i guess would be to use a div instead, and make it a link. How do you make those work with forms?
write the below style into same html file head section or write into a .css file
<style type="text/css">
.submit input
{
color: #000;
background: #ffa20f;
border: 2px outset #d7b9c9
}
</style>
<input type="submit" class="submit"/>
.submit - in css . means class , so i created submit class with set of attributes
and applied that class to the submit tag, using class attribute
You can directly create your own style in this way:
input[type=button]
{
//Change the style as you like
}
You might want to add:
-webkit-appearance: none;
if you need it looking consistent on Mobile Safari...
Yeah, it's pretty simple:
input[type="submit"]{
background: #fff;
border: 1px solid #000;
text-shadow: 1px 1px 1px #000;
}
I recommend giving it an ID or a class so that you can target it more easily.
Yes you can target those specificaly using input[type=submit]
e.g.
.myFormClass input[type=submit] {
margin: 10px;
color: white;
background-color: blue;
}
Source: Stackoverflow.com