View Full Version : CSS submit buttons??
nickbarresi
01-22-2003, 02:40 PM
Is this possible? If so what would the code look like to change the style of all submit buttons? I'm thinking something like:
submit{
border: 1px #333333 solid;
background-color: #e0e0e0;
font: 12px;
}
would this do anything?
Thanks in advance...
BrainJar
01-22-2003, 03:27 PM
That doesn't work because "submit" is not the tag name. Given:
<input type="submit">
you should use:
input{
border: 1px #333333 solid;
background-color: #e0e0e0;
font: 12px;
}
The problem is that the above would apply to all input types (check box, radio button, text, etc.). To get around that, you can use an attribute selector:
input[type="submit"] {
border: 1px #333333 solid;
background-color: #e0e0e0;
font: 12px;
}
Unfortunately, IE doesn't recognize that type of selector in style sheets. To get around this, you can add a class name instead:
input.submitButton {
border: 1px #333333 solid;
background-color: #e0e0e0;
font: 12px;
}
which would apply only to input tags with the class name "submitButton" like this:
<input class="submitButton" type="submit">
nickbarresi
01-22-2003, 03:30 PM
Thanks BrianJar:)
cg9com
01-22-2003, 04:03 PM
Originally posted by BrainJar
input[type="submit"]
Unfortunately, IE doesn't recognize that type of selector in style sheets
and its a shame 2
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.